#35838: request.read() returns empty for Requests w/ Transfer-Encoding: Chunked
------------------------------------+--------------------------------------
Reporter: Klaas van Schelven | Owner: (none)
Type: Uncategorized | Status: new
Component: HTTP handling | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+--------------------------------------
Comment (by Klaas van Schelven):
> first part of that paragraph
but:
* "applications must not generate" does not apply here (that's for
Response Transfer-Encoding)
* "attempt to use [..] generate such headers" same
* "rely on the content" I don't think my proposed direction for Django is
relying on anything other than _not_ relying on Content-Length
Regarding the quotes: admittedly I didn't have the full discussions top-
of-mind after spending a day debugging. I suppose I also discounted some
points I didn't agree with. But if I reread those whole threads, I mostly
get the sense of Benoit asking "why can't we just fix this" and it falling
on deaf ears... btw the "FWIW" by Graham actually points to him agreeing
with Benoit.
By the way, I can't actually find the part of the spec that says Content-
Length is required; nor can I find the part that says "if it's not there,
just assume 0". I'm using ^F... perhaps it's implied through something
else?
having said all that, I have an open point and an open question:
1. _even if_ one would say that Django cannot read from a request's body
on the application-side of WSGI, as per the WSGI spec, that does not imply
Django should just silently throw away the data for that case. Would
raising an exception not be much better?
2. does the "solution" (workaround) that I proposed (and for my own
project: implemented) have any actual downsides other than not following
the WSGI spec? I have personal reasons to ask, but the answer would also
be generally useful in telling us whether it's a viable general solution
--
Ticket URL: <https://code.djangoproject.com/ticket/35838#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701928cbb2c0e-58dff52c-0693-4fc4-90f2-562a380407cf-000000%40eu-central-1.amazonses.com.