#36628: StreamingHttpResponse doesn't send final ASGI more_body=False signal
-------------------------------------+-------------------------------------
     Reporter:  Louis Amon           |                    Owner:  Louis
                                     |  Amon
         Type:  Bug                  |                   Status:  assigned
    Component:  HTTP handling        |                  Version:  5.2
     Severity:  Normal               |               Resolution:
     Keywords:  streaming, vercel,   |             Triage Stage:
  asgi                               |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Carlton Gibson):

 #33738 was about handling multiple body events when parsing the request.
 This here is about the response. In both cases, a `more_body=True` entails
 that there's more to come (but they're not otherwise related).

 The [https://asgi.readthedocs.io/en/latest/specs/www.html#response-body-
 send-event spec here for Response body events] is clear (my emphasis
 added):

 > `more_body (bool)` – Signifies if there is additional content to come
 (as part of a Response Body message). If False, and the server is not
 expecting Response Trailers response will be taken as complete and closed,
 and any further messages on the channel will be ignored. **Optional; if
 missing defaults to False**.

 That is, if `more_body` is missing, it should be assumed to be `False`.
 (It's **optional** and emitting it is not an error.)

 Looking at
 
[https://github.com/vercel/vercel/blob/6661ea2ac385704601124e7ebe7596dcf95f0cc8/packages/python/vc_init.py#L641
 the Vercel code, it already does this], so I can't quite see from the
 information given what the problem is. 🤔
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36628#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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019994e74cdf-0312a946-fec7-4f29-a3d8-740ded37f9ed-000000%40eu-central-1.amazonses.com.

Reply via email to