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
chunked encoding bug with latest version of django. #1264
Comments
cc @jezdez maybe you know if there have been some discussions about it? |
…uests After looking at the code of Django or Werkzeug it seems that some WSGI frameworks considers that the body is empty when the `CONTENT_LENGTH` environ key is not present: - django: https://github.com/django/django/blob/master/django/core/handlers/wsgi.py#L109-L112 - https://github.com/pallets/werkzeug/blob/master/werkzeug/wsgi.py#L205-L210 So waiting for a better spec set the size to max since we know that Gunicorn is able to handle chunked encoding. fix #1264
ok I'm not sure what to do with this solution, maybe we should just force the usage of content-length for frameworks that don't handle HTTP 1.1 ? cc @tilgovi @berkerpeksag |
If I remember correctly, Django handles HTTP 1.1. The lines you mentioned in #605 (comment) haven't changed since 5 years and the OP's Django version is a little bit old. I haven't read the whole discussion in #605 and tried the test project yet so I might be missing something here. Perhaps @timgraham or @claudep can chime in. |
I don't remember anything about Django supporting chunked transfer encoding at the request side. It might well be a missing feature in Django. |
I don't know much about the specifics, but a quick search indicates "This is a not a Django issue. It is a limitation of the WSGI specification itself in as much as the WSGI specification prohibits use of chunked request content by requiring a CONTENT_LENGTH value for request." -Graham Dumpleton |
i know what the spec says. But some frameworks allow to bypass this rule. Anyway like i says we have limited options since i've never been answered
|
no feedback given. closing the issue. |
Following the discussing on #605 :
#605 (comment)
Django doesn't handle anymore chunked encoded requests. Not sure how to fix it yet.
The text was updated successfully, but these errors were encountered: