Commits

Sergey Schetinin committed 6b1f2d0

fix setting request body to FakeCGIBody to work with the updated body_file logic, FakeCGIBody.update_environ is now removed

  • Participants
  • Parent commits fe834c1

Comments (0)

Files changed (1)

                               environ=fs_environ,
                               keep_blank_values=True)
         vars = MultiDict.from_fieldstorage(fs)
-        FakeCGIBody.update_environ(env, vars)
-        env['webob._parsed_post_vars'] = (vars, self.body_file)
+        #ctype = self.content_type or 'application/x-www-form-urlencoded'
+        ctype = env.get('CONTENT_TYPE', 'application/x-www-form-urlencoded')
+        self.body_file = FakeCGIBody(vars, ctype)
+        env['webob._parsed_post_vars'] = (vars, self.body_file_raw)
         return vars
 
 
             self.__class__.__name__,
             abs(id(self)), inner)
 
-    @classmethod
-    def update_environ(cls, environ, vars):
-        obj = cls(vars, environ.get('CONTENT_TYPE', 'application/x-www-form-urlencoded'))
-        environ['CONTENT_LENGTH'] = '-1'
-        environ['wsgi.input'] = obj
-
 
 def _encode_multipart(vars, content_type):
     """Encode a multipart request body into a string"""