Skip to content

Commit 038f408

Browse files
committed
[connect-tcp] Qualify use of SHOULD with "capsule-protocol: ?1"
Also adds a recommendation for H2/H3. Fixes #3078
1 parent 46f925e commit 038f408

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

draft-ietf-httpbis-connect-tcp.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ In HTTP/1.1, the client uses the proxy by issuing a request as follows:
8282
* The request SHALL include a single "Host" header field containing the origin of the proxy.
8383
* The request SHALL include a "Connection" header field with the value "Upgrade". (Note that this requirement is case-insensitive as per {{Section 7.6.1 of !RFC9110}}.)
8484
* The request SHALL include an "Upgrade" header field with the value "connect-tcp".
85-
* The request SHOULD include a "Capsule-Protocol: ?1" header.
85+
* The request SHOULD include a "Capsule-Protocol: ?1" header (as recommended in {{!RFC9297, Section 3.4}}).
8686

8787
If the request is well-formed and permissible, the proxy MUST attempt to establish the TCP connection before sending any response status code other than "100 (Continue)" (see {{conveying-metadata}}). If the TCP connection is successful, the response SHALL be as follows:
8888

8989
* The HTTP status code SHALL be "101 (Switching Protocols)".
9090
* The response SHALL include a "Connection" header field with the value "Upgrade".
9191
* The response SHALL include a single "Upgrade" header field with the value "connect-tcp".
92-
* The response SHOULD include a "Capsule-Protocol: ?1" header.
92+
* The response SHOULD include a "Capsule-Protocol: ?1" header (as above).
9393

9494
If the request is malformed or impermissible, the proxy MUST return a 4XX error code. If a TCP connection was not established, the proxy MUST NOT switch protocols to "connect-tcp", and the client MAY reuse this connection for additional HTTP requests.
9595

@@ -122,6 +122,8 @@ In HTTP/2 and HTTP/3, the proxy MUST include SETTINGS_ENABLE_CONNECT_PROTOCOL in
122122

123123
A templated TCP proxying request that does not conform to all of these requirements represents a client error (see {{!RFC9110, Section 15.5}}) and may be malformed (see {{Section 8.1.1 of !RFC9113}} and {{Section 4.1.2 of !RFC9114}}).
124124

125+
Additionally the "capsule-protocol" header field SHOULD be present with a value of "?1" (as recommended in {{!RFC9297, Section 3.4}}).
126+
125127
~~~
126128
HEADERS
127129
:method = CONNECT

0 commit comments

Comments
 (0)