#5241: Response middleware runs too early for streaming responses
-------------------------------------+-------------------------------------
Reporter: bittor | Owner: aaugustin
Type: Bug | Status: new
Component: HTTP handling | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Design
internationalization, progresive | decision needed
rendering | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):
* version: => master
* component: Internationalization => HTTP handling
Comment:
The general problem is that middleware's `process_response` (and possibly
`process_exception`) run before the content of a streaming response has
been generated. This doesn't match the current assumption that these
middleware run after the response is generated.
At least the transaction middleware suffers from the same problem. If we
can't fix both at the same time, we should open another ticket for that
one.
Off the top of my head -- we could:
- run these middleware methods at a later point,
- introduce a new middleware method for streaming responses.
#19519 is related, but it's a different problem -- it's about firing the
`request_finished` signal.
--
Ticket URL: <https://code.djangoproject.com/ticket/5241#comment:14>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.