Ticket #2742: content_type_fix.diff

File content_type_fix.diff, 579 bytes (added by Sergey <rushman@…>, 9 years ago)

Fix for empty CONTENT_TYPE bug

  • wsgi.py

     
    157157            return self._raw_post_data
    158158        except AttributeError:
    159159            buf = StringIO()
    160             content_length = int(self.environ['CONTENT_LENGTH'])
     160            content_length = int(self.environ.get('CONTENT_LENGTH', 0))
    161161            safe_copyfileobj(self.environ['wsgi.input'], buf, size=content_length)
    162162            self._raw_post_data = buf.getvalue()
    163163            buf.close()
Back to Top