#NEWLINE# @ property #NEWLINE# def POST( self ) : #NEWLINE# #INDENT# '\n        Return a MultiDict containing all the variables from a form\n        request. Returns an empty dict-like object for non-form requests.\n\n        Form requests are typically POST requests, however PUT requests with\n        an appropriate Content-Type are also supported.\n        ' #NEWLINE# env = self . environ #NEWLINE# if ( self . method not in ( 'POST' , 'PUT' ) ) : #NEWLINE# #INDENT# return NoVars ( 'Not a form request' ) #NEWLINE# #UNINDENT# if ( 'webob._parsed_post_vars' in env ) : #NEWLINE# #INDENT# ( vars , body_file ) = env [ 'webob._parsed_post_vars' ] #NEWLINE# if ( body_file is self . body_file_raw ) : #NEWLINE# #INDENT# return vars #NEWLINE# #UNINDENT# #UNINDENT# content_type = self . content_type #NEWLINE# if ( ( ( self . method == 'PUT' ) and ( not content_type ) ) or ( content_type not in ( '' , 'application/x-www-form-urlencoded' , 'multipart/form-data' ) ) ) : #NEWLINE# #INDENT# return NoVars ( ( 'Not an HTML form submission (Content-Type: %s)' % content_type ) ) #NEWLINE# #UNINDENT# self . _check_charset ( ) #NEWLINE# if self . is_body_seekable : #NEWLINE# #INDENT# self . body_file_raw . seek ( 0 ) #NEWLINE# #UNINDENT# fs_environ = env . copy ( ) #NEWLINE# fs_environ . setdefault ( 'CONTENT_LENGTH' , '0' ) #NEWLINE# fs_environ [ 'QUERY_STRING' ] = '' #NEWLINE# if PY3 : #NEWLINE# #INDENT# fs = cgi . FieldStorage ( fp = self . body_file , environ = fs_environ , keep_blank_values = True , encoding = 'utf8' ) #NEWLINE# vars = MultiDict . from_fieldstorage ( fs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fs = cgi . FieldStorage ( fp = self . body_file , environ = fs_environ , keep_blank_values = True ) #NEWLINE# vars = MultiDict . from_fieldstorage ( fs ) #NEWLINE# #UNINDENT# ctype = ( self . _content_type_raw or 'application/x-www-form-urlencoded' ) #NEWLINE# f = FakeCGIBody ( vars , ctype ) #NEWLINE# self . body_file = io . BufferedReader ( f ) #NEWLINE# env [ 'webob._parsed_post_vars' ] = ( vars , self . body_file_raw ) #NEWLINE# return vars