#34556: StreamingHttpResponse documentation inaccuracy
----------------------------------+--------------------------------------
Reporter: Alexandre Spaeth | Owner: nobody
Type: Uncategorized | Status: closed
Component: Documentation | Version: 4.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by Natalia Bidart):
* status: new => closed
* resolution: => invalid
Comment:
Hello Alexandre!
I believe we'd have to close this ticket as invalid, see my reasoning
below:
On the one hand, a string *is* an iterator, so strictly speaking, a string
can be passed to `StreamingHttpResponse` because a string is an iterable
on its own.
On the other hand, the usage of `make_bytes` in `streaming_content` is
focused on ensuring that the `part` being returned is, in fact, bytes and
not other type.
Lastly, the documentation clearly says that `StreamingHttpResponse` is not
a subclass of `HttpResponse` so concepts that apply to the latter would
not apply to the former. Specifically, a `StreamingHttpResponse` has no
`content` attibute as described [https://docs.djangoproject.com/en/4.2/ref
/request-response/#django.http.StreamingHttpResponse here].
What tests are you referring to that pass a string to
`StreamingHttpResponse`?
Based on the above and after re-reading the docs for
`StreamingHttpResponse`, I think that the current text is correct and
complete so I'll close as invalid but please re-open if I misread or
misunderstood your report.
--
Ticket URL: <https://code.djangoproject.com/ticket/34556#comment:2>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018806a4e82a-ba5dea9e-d674-49bd-ad6c-32045c094cb9-000000%40eu-central-1.amazonses.com.