-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.6-7
Any 2xx (Successful) response indicates that the sender (and all inbound proxies) will switch to tunnel mode immediately after the response header section
https://www.rfc-editor.org/rfc/rfc9112.html#section-6.3-2.2
Any 2xx (Successful) response to a CONNECT request implies that the connection will become a tunnel immediately after the empty line that concludes the header fields. A client MUST ignore any Content-Length or Transfer-Encoding header fields received in such a message.
runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs
Line 787 in 39a31f0
else if (request.Method.IsConnect && response.StatusCode == HttpStatusCode.OK) |
Line 779 in 39a31f0
if (tunnelResponse.StatusCode != HttpStatusCode.OK) |
runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs
Line 657 in 39a31f0
if (statusCode == 200 && _response.RequestMessage!.IsExtendedConnectRequest) |
Just from reading the RFC, not sure we've seen a proxy that uses a different 2XX response.