#13222: unexpected HttpResponse iteration behavior
-------------------------------------+-------------------------------------
               Reporter:  teepark    |        Owner:  nobody
                   Type:  Bug        |       Status:  reopened
              Milestone:             |    Component:  HTTP handling
                Version:  1.3-rc1    |     Severity:  Normal
             Resolution:             |     Keywords:
           Triage Stage:  Design     |    Has patch:  1
  decision needed                    |  Needs tests:  0
    Needs documentation:  0          |
Patch needs improvement:  0          |
-------------------------------------+-------------------------------------

Comment (by teepark):

 Replying to [comment:12 Alex]:
 > I'm not sure we *want* to fix this.  Almost all file-like objects have
 this behavior.  Needs more thought IMO.

 I'd be happy if HttpResponse emulated file objects' behavior, but that's
 not quite the case either (the code snippet from the OP works fine with a
 file).

 File objects have a single cursor location that all iterators wind up
 sharing, but they don't set it back to the beginning of the file every
 time you call iter() on it, which in effect is what HttpResponse does
 currently.

 IMO the design decision should be whether we fix it to be like list (the
 current patch) or we fix it to be like files.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13222#comment:13>
Django <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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to