#7581: Middleware accessing HttpResponse.content breaks streaming HttpResponse
objects.
---------------------------------------------+------------------------------
Reporter: mrmachine | Owner: nobody
Status: new | Milestone: post-1.0
Component: Core framework | Version: SVN
Resolution: | Keywords: stream
HttpResponse
Stage: Design decision needed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Comment (by isagalaev):
I was thinking about this some time and changed my mind a little...
I agree with Tai Lee that this ticket is not about some abstract ultimate
way for keeping streaming responses remain streaming after middleware.
It's about fixing some points that can be fixed. However I now think that
current patch does it the wrong way for two reasons.
1. It relies on how the response was constructed which doesn't always
correlate with the need to apply certain middleware. For example one may
still want to count ETag or gzip content of small files which will be
treated as generators.
2. Gzipping a stream just can't work because WSGI wants Content-length to
be set for response and it's impossible to count without gzipping the
whole contents.
So may be what's really needed here is a simple way for a view to
explicitly flag the response with "don't gzip it" or "don't etag it".
--
Ticket URL: <http://code.djangoproject.com/ticket/7581#comment:8>
Django Code <http://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 this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---