#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 mrmachine):

 Updated patch to add a `stream_content` argument (defaults to `False`) to
 specify whether or not content generator should be consumed immediately.
 Middleware can then assume that if content generator exists, user intended
 it to be preserved. Default behaviour will be to consume content, and if
 middleware authors want to (and can) work with streaming content, all they
 need to do is set `response.content` to a new generator (and we make
 `response.content_generator`) available publicly so they can alter the
 original generator if one is set.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7581#comment:10>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to