#7581: Middleware accessing HttpResponse.content breaks streaming HttpResponse objects. -------------------------------------+------------------------------------- Reporter: mrmachine | Owner: ccahoon Type: New feature | Status: new Component: Core (Other) | Version: master Severity: Normal | Resolution: Keywords: stream HttpResponse | Triage Stage: Accepted Content-Length | Needs documentation: 0 Has patch: 1 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+-------------------------------------
Comment (by aaugustin): '''Design decisions''' - I'm not going to refactor `HttpResponse` right now; there's another ticket about that. - I'm going to introduce a subclass of `StreamingHttpResponse` that provides a deprecated content attribute, and use that class in the static serve view, to preserve backwards compatibility. - I'm going to introduce a `response.streaming` boolean flag to avoid the `hasattr(response, 'streaming_content')` pattern. - I'm not going to change the middleware API. -- Ticket URL: <https://code.djangoproject.com/ticket/7581#comment:39> 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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.