Changes between and of Initial VersionVersion 1Ticket #3585
- 12/19/2008 07:45:08 AM (7 years ago)
- Property Summary changed from [PATCH] Request.content should be rewinded to the beginning before Request.process is called to If the Content-Type of a request is "application/x-www-form-urlencoded", twisted.web.wsgi gives applications a zero-length input object
initial v1 1 This causes problem with the recently added twisted.web.wsgi. 2 3 If a POST Request's Content-Type equals to 'application/x-www-form-urlencoded', calling environ['wsgi.input'].read(...) in a wsgi app will return empty string since it had been read before in the Twisted framework. 4 5 Patch attached. 1 Sometimes `twisted.web.http.Request.requestReceived` reads from the body object (`Request.content`) and parses the result into `Request.args`. Then it calls process. If a `twisted.web.wsgi.WSGIResource` is getting the request, it will be passed on as the ''wsgi.input'' in the `environ` to application code. This means that sometimes a wsgi application will get an already-read input and not be able to get the request body.