#NEWLINE# def get_content_type( self ) : #NEWLINE# #INDENT# 'Determine content type of the request body.' #NEWLINE# if ( not self . content_type ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if ( not self . should_have_body ( ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# content_types = self . content_type . split ( ',' ) #NEWLINE# for ct in content_types : #NEWLINE# #INDENT# if ( ct in parsers . get_supported_content_types ( ) ) : #NEWLINE# #INDENT# return ct #NEWLINE# #UNINDENT# #UNINDENT# LOG . debug ( 'Unrecognized Content-Type provided in request' ) #NEWLINE# raise exception . InvalidContentType ( content_type = ct . content_type )