Re: How to handle "101 Switching Protocols in H2 or H3"

On Thu, 17 Aug 2023, 15:16 Cory Benfield, <> wrote:

> It's a good catch that RFC 9113 doesn't explicitly call out what you
> should do here.
> The response code should not be propagated to the next hop: as RFC
> 9113 says, you are not permitted to send a 101 in HTTP/2. This is a
> stream error of type PROTOCOL_ERROR.

If I'm a client talking to an intermediary and my request (that is valid
and would never cause a 101) gets reset like that, I'm going to get
confused because I didn't break the protocol.

So the intermediary in its client role might want to reset the stream with
PROTOCOL_ERRROR but in its server role would probably be better emitting a
502 Bad Gateway,  or closing stream with INTERNAL_ERROR.

Received on Thursday, 17 August 2023 14:30:04 UTC