100 continue expectation with HTTP/2

Hi,

I can't find a clear statement of how a H2 client should behave when it has
sent a request containing an 100 Continue expectation, but that receives a
response other than a 100.

In RFC9110 10.1.1 Expect
<https://httpwg.org/specs/rfc9110.html#field.expect> it only says:

>
>    - A server that responds with a final status code before reading the
>    entire request content *SHOULD* indicate whether it intends to close
>    the connection (e.g., see Section 9.6
>    <https://httpwg.org/specs/rfc9112.html#persistent.tear-down> of
>    [HTTP/1.1] <https://httpwg.org/specs/rfc9110.html#HTTP11>) or continue
>    reading the request content.
>
> So there is an example of how a HTTP/1.1 server should behave (close the
connection after sending the response).

But I can find no such statement regarding H2, which does not use a
Connection: close header and thus has no way of indicating if the server
intends to read the request content or not.

How should the client behave if it receives a 302, 401, etc. response for a
h2 request with expectation?  Should it close the stream without sending a
validly framed request body (as indicated by the headers already sent)?

What if it receives a 200 response?  How does it know if the server is
waiting to read the content or not?  Should the client reset the stream?
Or should the server reset the stream after sending the response?

Have I missed where this is documented?

regards






-- 
Greg Wilkins <gregw@webtide.com> CTO http://webtide.com

Received on Friday, 1 December 2023 00:36:58 UTC