#35838: Support Requests with Transfer-Encoding: Chunked
------------------------------------+------------------------------------
Reporter: Klaas van Schelven | Owner: (none)
Type: New feature | Status: new
Component: HTTP handling | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+------------------------------------
Comment (by bcail):
It seems like "de-chunk the request" is another way of saying "decoding
any inbound Transfer-Encoding, including chunked encoding if applicable"
(from WSGI [https://peps.python.org/pep-3333/#other-http-features
PEP3333]). RFC2616 describes how to
[https://datatracker.ietf.org/doc/html/rfc2616.html#section-19.4.6 decode
a chunked request]:
{{{
length := 0
read chunk-size, chunk-extension (if any) and CRLF
while (chunk-size > 0) {
read chunk-data and CRLF
append chunk-data to entity-body
length := length + chunk-size
read chunk-size and CRLF
}
read entity-header
while (entity-header not empty) {
append entity-header to existing header fields
read entity-header
}
Content-Length := length
Remove "chunked" from Transfer-Encoding
}}}
This looks to me like the WSGI server should set the Content-Length
header, and remove "chunked" from Transfer-Encoding, before passing the
request to Django (unless Django and the WSGI servers decide to ignore the
spec here).
--
Ticket URL: <https://code.djangoproject.com/ticket/35838#comment:16>
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 visit
https://groups.google.com/d/msgid/django-updates/01070192c01ce508-721cd756-6a07-460d-a1a9-fc06df979ee8-000000%40eu-central-1.amazonses.com.