On Mon, Aug 20, 2012 at 3:21 PM, Alex Gaynor <alex.gay...@gmail.com> wrote:

> My inclination is that we should kill .content entirely, middleware that
> wants to rewrite the response will have two choices:
>
> 1) explicitly evaluate the entire response, and return a new HttpResponse
> object
> 2) return s anew HttpResponse object that has a generator that iteratively
> evaluates the previous one and rewrite it incrementally.
>
> Alex
>

Doesn't that break anyone who hangs arbitrary attributes on their
HttpResponse objects for the sake of their middleware? I've never done this
on the way out, only on the way in on HttpRequest objects, but I can
imagine it being useful if you wanted to conditionally disable middleware
or something. You could argue that depending on the same instance making it
through several layers of middleware is already iffy, but recommending as a
best practice to create new HttpResponses would *really* break this.

Best,
Alex Ogier

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to