#18796: Refactor HttpResponse.__iter__ / _get_content
-------------------------------------+-------------------------------------
     Reporter:  aaugustin            |                    Owner:  aaugustin
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  master
    Component:  HTTP handling        |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by aaugustin):

 This comment was made on #7581 but it actually falls in the scope of this
 ticket:

 Returning `self._iterator` directly in
 `HttpStreamingResponse.streaming_content`, instead of a new iterator that
 yields bytestrings means that middleware authors can't expect consistent
 bytestring chunks when wrapping streaming_content in a new iterator? They
 may have to type check or coerce each chunk (potentially reproducing
 something like `make_bytes()`? For comparison, `HttpResponse.content`
 always returns a bytestring.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18796#comment:3>
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to