Skip to content

Commit

Permalink
Merge pull request #2847 from httpwg/bemasc-capsule
Browse files Browse the repository at this point in the history
[connect-tcp] Discuss use of the Capsule Protocol
  • Loading branch information
bemasc committed Aug 2, 2024
2 parents d3f08e7 + d75aaae commit d26f7c3
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions draft-ietf-httpbis-connect-tcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,13 @@ Authentication to a templated TCP proxy normally uses ordinary HTTP authenticati

Clients SHOULD assume that all proxy resources generated by a single template share a protection space (i.e., a realm) ({{?RFC9110, Section 11.5}}). For many authentication schemes, this will allow the client to avoid waiting for a "401 (Unauthorized)" response before each new connection through the proxy.

## Relationship to the Capsule Protocol
### Use of the Capsule Protocol {#capsule-protocol}

Unlike the datagram-oriented templated HTTP proxying specifications {{CONNECT-UDP}}{{CONNECT-IP}}, this specification does not make use of the Capsule Protocol {{?RFC9297}}. A future specification could define a procedure for performing TCP proxying using the Capsule Protocol, but no such procedure is defined here.
In this specification, use of the Capsule Protocol {{?RFC9297}} is OPTIONAL. Clients MAY request use of the Capsule Protocol by including a "Capsule-Protocol: ?1" header field in the request.

When implementing this specification, clients and servers MUST NOT send a "Capsule-Protocol: ?1" header field.
Server support for the Capsule Protocol is also OPTIONAL. If the request includes "Capsule-Protocol: ?1", and the server does not support the Capsule Protocol, the server MUST respond with a 4xx (Client Error) status and a "Capsule-Protocol: ?0" response header field, and MUST discard any data received on this request stream. Upon receiving such a response, the client MUST retry the request without the Capsule Protocol and MAY disable use of the Capsule Protocol with this URI Template for the remainder of the session.

When using the Capsule Protocol, TCP payload data is sent in the payload of a new Capsule Type named DATA ({{data-capsule}}). The ordered concatenation of DATA capsule payloads has the same semantics as what would have been sent on the data stream if the Capsule Protocol were not in use. It is applicable whenever use of the Capsule Protocol is optional.

# Additional Connection Setup Behaviors

Expand Down Expand Up @@ -222,6 +224,8 @@ IF APPROVED, IANA is requested to add the following entry to the HTTP Upgrade To
* Description: Proxying of TCP payloads
* Reference: (This document)

For interoperability testing of this draft version, implementations SHALL use the value "connect-tcp-05".

## New MASQUE Default Template {#iana-template}

IF APPROVED, IANA is requested to add the following entry to the "MASQUE URI Suffixes" registry:
Expand All @@ -230,6 +234,16 @@ IF APPROVED, IANA is requested to add the following entry to the "MASQUE URI Suf
| Path Segment | Description | Reference |
| tcp | TCP Proxying | (This document) |

## New Capsule Type {#data-capsule}

IF APPROVED, IANA is requested to add the following entry to the "HTTP Capsule Types" registry:

| ----- | ------------ | --------- | ------------------------------------- | ----------------- | ------- |
| Value | Capsule Type | Status | Reference | Change Controller | Contact |
| (TBD) | DATA | permanent | (This document), {{capsule-protocol}} | IETF | HTTPBIS |

For this draft version of the protocol, the Capsule Type value `0xb739a6d0` shall be used provisionally for testing, under the name "DATA-05".

--- back

# Acknowledgments
Expand Down

0 comments on commit d26f7c3

Please sign in to comment.