Commits

Sergey Schetinin committed 71c88d7

do seeks on raw body_file

Comments (0)

Files changed (2)

webob/__init__.py

 ]
 
 BaseRequest.ResponseClass = Response
-Response.RequestClass = Request
+Response.RequestClass = BaseRequest #TODO: just use BaseRequest directly (1.2)
 
 __version__ = '1.1'
 
             return ''
         self.make_body_seekable() # we need this to have content_length
         r = self.body_file.read(self.content_length)
-        self.body_file.seek(0)
+        self.body_file_raw.seek(0)
         return r
     def _body__set(self, value):
         if value is None:
             return NoVars('Not an HTML form submission (Content-Type: %s)'
                           % content_type)
         if self.is_body_seekable:
-            self.body_file.seek(0)
+            self.body_file_raw.seek(0)
         fs_environ = env.copy()
         # FieldStorage assumes a missing CONTENT_LENGTH, but a
         # default of 0 is better:
             return self.environ.get('webob.is_body_readable', False)
 
     def _is_body_readable__set(self, flag):
-        #@@ WARN
         self.environ['webob.is_body_readable'] = bool(flag)
 
     is_body_readable = property(_is_body_readable__get, _is_body_readable__set,