Skip to content

Commit

Permalink
Add information about when to start sending response (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristjanvalur authored May 6, 2023
1 parent c3d70c3 commit 7c8d31c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion specs/www.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ Response Start - ``send`` event
Sent by the application to start sending a response to the client. Needs to be
followed by at least one response content message.

Protocol servers *need not* flush the data generated by this event to the
send buffer until the first *Response Body* event is processed.
This may give them more leeway to replace the response with an error response
in case internal errors occur while handling the request.

You may send a ``Transfer-Encoding`` header in this message, but the server
must ignore it. Servers handle ``Transfer-Encoding`` themselves, and may opt
to use ``Transfer-Encoding: chunked`` if the application presents a response
Expand Down Expand Up @@ -199,7 +204,7 @@ Response Body - ``send`` event
Continues sending a response to the client. Protocol servers must
flush any data passed to them into the send buffer before returning from a
send call. If ``more_body`` is set to ``False``, and the server is not
expecting *Response Trailers* this will close the connection.
expecting *Response Trailers* this will complete the response.

Keys:

Expand Down

0 comments on commit 7c8d31c

Please sign in to comment.