-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request.body hangs forever when no body is submitted #233
Comments
This one is fun... |
So after chewing it on it for a couple more days, I am closing this as WONTFIX.
Since in this case there is no content-length sent, it should treat it as an empty body (0 byte content length), thus the WSGI server should return an empty bytestring. A server like https://github.com/Pylons/waitress does not exhibit this same problem, and is correctly returning an empty bytestring. Testing with waitress:
|
I'm satisfied with both, evidences and explanation. As a future reference, I have tested with waitress, gunicorn, uwsgi and wsgiref.simple_server (py27 and py34). Only the reference server fails, in both versions. I'ts kind of ironic that reference implementation (wsgiref) is the first to violate his own standard... Nice catch! |
Project: openstack/requirements 7b0e189a2bf2d95276086193fce3bd1587a0ca40 Use WebOb >= 1.7.1 This fixes a bug in WebOb Pylons/webob#233 Closes-Bug: #1659641 Change-Id: If2008f4582866e6b21ced52c70a5de21789d0855
This fixes a bug in WebOb Pylons/webob#233 Closes-Bug: #1659641 Change-Id: If2008f4582866e6b21ced52c70a5de21789d0855
Project: openstack/requirements 7b0e189a2bf2d95276086193fce3bd1587a0ca40 Use WebOb >= 1.7.1 This fixes a bug in WebOb Pylons/webob#233 Closes-Bug: #1659641 Change-Id: If2008f4582866e6b21ced52c70a5de21789d0855
This fixes a bug in WebOb Pylons/webob#233 Closes-Bug: #1659641 Depends-On: I0d970671e8d271c91ea5f10e3e5a0272fdf06656 Change-Id: If2008f4582866e6b21ced52c70a5de21789d0855
This is the first WebOb release to contain a fix to bug Pylons/webob#233 Closes-Bug: #1659641 Change-Id: If2008f4582866e6b21ced52c70a5de21789d0855
This fixes a bug in WebOb Pylons/webob#233 Closes-Bug: #1659641 Depends-On: I0d970671e8d271c91ea5f10e3e5a0272fdf06656 Change-Id: If2008f4582866e6b21ced52c70a5de21789d0855
This is the first WebOb release to contain a fix to bug Pylons/webob#233 Closes-Bug: #1659641 Change-Id: If2008f4582866e6b21ced52c70a5de21789d0855
This fixes a bug in WebOb Pylons/webob#233 Closes-Bug: #1659641 Change-Id: If2008f4582866e6b21ced52c70a5de21789d0855
This fixes a bug in WebOb Pylons/webob#233 Closes-Bug: #1659641 Change-Id: If2008f4582866e6b21ced52c70a5de21789d0855
Hi all,
I am making a really minimal API mongodb based. By chance, I have discovered a bug when reading request.body, that causes code to hang forever. I tried to reproduce the bare minimum to show the error, as stated here:
The application is really minimal, as follows (it has also a wsgiref.simple_server:make_server instance, but it's unimportant):
And the "API" invocations is done via curl, as follows:
During this two invocations, it's clear that reading req.body blocks everything, when CONTENT_LENGTH is '' instead of '0'.
I'm really worried about this because body is out of my reach, depending on my users' good faith.
If it helps, the only module involved is WebOb==1.5.1, pip'ed from pypi
Regards
The text was updated successfully, but these errors were encountered: