Commits

Anonymous committed 81543f1

Add a .seek(0) before copying the body

  • Participants
  • Parent commits 96e7457

Comments (0)

Files changed (1)

webob/__init__.py

         tempfile_limit = self.request_body_tempfile_limit
         body = None
         input = self.body_file
+        if hasattr(input, 'seek'):
+            # Just in case someone has read parts of the body already
+            ## FIXME: Should we use .tell() to try to put the body
+            ## back to its previous position?
+            input.seek(0)
         if length == -1:
             body = self.body
             length = len(body)