You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-ietf-httpbis-connect-tcp.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,10 +168,13 @@ When closing connections, endpoints are subject to the following requirements:
168
168
* When a TCP connection reaches the TIME-WAIT or CLOSED state, the associated endpoint MUST close its send stream.
169
169
- If the connection closed gracefully, the endpoint MUST close the send stream gracefully.
170
170
- Otherwise, the endpoint SHOULD close the send stream abruptly, using a mechanism appropriate to the HTTP version:
171
-
- HTTP/3: RESET_STREAM with H3_CONNECT_ERROR
172
-
- HTTP/2: RST_STREAM with CONNECT_ERROR
173
-
- HTTP/1.1 over TLS: a TLS Error Alert
174
-
- HTTP/1.1 (insecure): TCP RST.
171
+
- HTTP/3: reset the stream with H3_CONNECT_ERROR;
172
+
see {{!RFC9000, Section 19.4}} and {{?RFC9114, Section 8.1}}
173
+
- HTTP/2: reset the stream with CONNECT_ERROR;
174
+
see {{!RFC9113}}, Sections 6.4 and 7
175
+
- HTTP/1.1 over TLS: TCP shutdown without a TLS closure alert;
176
+
see {{!RFC8446, Section 6.1}}.
177
+
- HTTP/1.1 without TLS: TCP RST
175
178
* When the receive stream is closed abruptly or without a FINAL_DATA capsule received, the endpoint SHOULD send a TCP RST if the TCP subsystem permits it.
176
179
177
180
The mandatory behaviors above enable endpoints to detect any truncation of incoming TCP data. The recommended behaviors propagate any TCP errors through the proxy connection.
@@ -204,7 +207,7 @@ The mandatory behaviors above enable endpoints to detect any truncation of incom
@@ -237,7 +240,7 @@ Servers that host a proxy under this specification MAY offer support for TLS ear
237
240
238
241
This specification supports the "Expect: 100-continue" request header ({{?RFC9110, Section 10.1.1}}) in any HTTP version. The "100 (Continue)" status code confirms receipt of a request at the proxy without waiting for the proxy-destination TCP handshake to succeed or fail. This might be particularly helpful when the destination host is not responding, as TCP handshakes can hang for several minutes before failing. Clients MAY send "Expect: 100-continue", and proxies MUST respect it by returning "100 (Continue)" if the request is not immediately rejected.
239
242
240
-
Proxies implementing this specification SHOULD include a "Proxy-Status" response header {{!RFC9209}} in any success or failure response (i.e., status codes 101, 2XX, 4XX, or 5XX) to support advanced client behaviors and diagnostics. In HTTP/2 or HTTP/3, proxies MAY additionally send a "Proxy-Status" trailer in the event of an unclean shutdown.
243
+
Proxies implementing this specification SHOULD include a "Proxy-Status" response header {{!RFC9209}} in any success or failure response (i.e., status codes 101, 2XX, 4XX, or 5XX) to support advanced client behaviors and diagnostics. In HTTP/2 or HTTP/3, proxies MAY additionally send a "Proxy-Status" trailer in the event of an abrupt stream closure.
241
244
242
245
# Applicability
243
246
@@ -291,7 +294,9 @@ A malicious client can achieve cause highly asymmetric resource usage at the pro
291
294
While this specification is fully functional under HTTP/1.1, performance-sensitive deployments SHOULD use HTTP/2 or HTTP/3 instead. When using HTTP/1.1:
292
295
293
296
* Each CONNECT request requires a new TCP and TLS connection, imposing a higher cost in setup latency, congestion control convergence, CPU time, and data transfer.
294
-
* It may be difficult to implement the recommended unclean shutdown signals ({{closing-connections}}), as many TLS libraries do not support injecting TLS Alerts.
297
+
* The graceful and abrupt closure signals ({{closing-connections}}) are more likely to be missing or corrupted:
298
+
- Some implementations may be unable to emit the recommended abrupt closure signals, due to limitations in their TCP and TLS subsystems.
299
+
- Faulty implementations may fail to send a TLS closure alert during graceful shutdown, or fail to report an error when the expected closure alert is not received. These misbehaviors are not compliant with {{RFC8446}}, but they are common nonetheless among HTTP/1.1 implementations today.
295
300
* The number of active connections through each client may be limited by the number of available TCP client ports, especially if:
296
301
- The client only has one IP address that can be used to reach the proxy.
297
302
- The client is shared between many parties, such as when acting as a gateway or concentrator.
0 commit comments