draft-ietf-masque-h3-datagram-01.txt   draft-ietf-masque-h3-datagram-02.txt 
MASQUE D. Schinazi MASQUE D. Schinazi
Internet-Draft Google LLC Internet-Draft Google LLC
Intended status: Standards Track L. Pardue Intended status: Standards Track L. Pardue
Expires: 14 November 2021 Cloudflare Expires: 28 November 2021 Cloudflare
13 May 2021 27 May 2021
Using QUIC Datagrams with HTTP/3 Using QUIC Datagrams with HTTP/3
draft-ietf-masque-h3-datagram-01 draft-ietf-masque-h3-datagram-02
Abstract Abstract
The QUIC DATAGRAM extension provides application protocols running The QUIC DATAGRAM extension provides application protocols running
over QUIC with a mechanism to send unreliable data while leveraging over QUIC with a mechanism to send unreliable data while leveraging
the security and congestion-control properties of QUIC. However, the security and congestion-control properties of QUIC. However,
QUIC DATAGRAM frames do not provide a means to demultiplex QUIC DATAGRAM frames do not provide a means to demultiplex
application contexts. This document describes how to use QUIC application contexts. This document describes how to use QUIC
DATAGRAM frames when the application protocol running over QUIC is DATAGRAM frames when the application protocol running over QUIC is
HTTP/3. It associates datagrams with client-initiated bidirectional HTTP/3. It associates datagrams with client-initiated bidirectional
skipping to change at page 1, line 43 skipping to change at page 1, line 43
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 14 November 2021. This Internet-Draft will expire on 28 November 2021.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2021 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
skipping to change at page 2, line 21 skipping to change at page 2, line 21
as described in Section 4.e of the Trust Legal Provisions and are as described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License. provided without warranty as described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Conventions and Definitions . . . . . . . . . . . . . . . 3 1.1. Conventions and Definitions . . . . . . . . . . . . . . . 3
2. Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1. Datagram Contexts . . . . . . . . . . . . . . . . . . . . 3 2.1. Datagram Contexts . . . . . . . . . . . . . . . . . . . . 3
2.2. Context ID Allocation . . . . . . . . . . . . . . . . . . 4 2.2. Context ID Allocation . . . . . . . . . . . . . . . . . . 4
3. HTTP/3 DATAGRAM Frame Format . . . . . . . . . . . . . . . . 4 3. HTTP/3 DATAGRAM Format . . . . . . . . . . . . . . . . . . . 4
4. CAPSULE HTTP/3 Frame Definition . . . . . . . . . . . . . . . 5 4. CAPSULE HTTP/3 Frame Definition . . . . . . . . . . . . . . . 6
4.1. The REGISTER_DATAGRAM_CONTEXT Capsule . . . . . . . . . . 6 4.1. The REGISTER_DATAGRAM_CONTEXT Capsule . . . . . . . . . . 7
4.2. The CLOSE_DATAGRAM_CONTEXT Capsule . . . . . . . . . . . 7 4.2. The REGISTER_DATAGRAM_NO_CONTEXT Capsule . . . . . . . . 8
4.3. The DATAGRAM Capsule . . . . . . . . . . . . . . . . . . 8 4.3. The CLOSE_DATAGRAM_CONTEXT Capsule . . . . . . . . . . . 10
5. The H3_DATAGRAM HTTP/3 SETTINGS Parameter . . . . . . . . . . 9 4.4. The DATAGRAM Capsule . . . . . . . . . . . . . . . . . . 11
6. HTTP/1.x and HTTP/2 Support . . . . . . . . . . . . . . . . . 9 5. Context Extensibility . . . . . . . . . . . . . . . . . . . . 12
7. Security Considerations . . . . . . . . . . . . . . . . . . . 10 5.1. The CLOSE_CODE Context Extension Type . . . . . . . . . . 12
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 5.2. The DETAILS Context Extension Type . . . . . . . . . . . 13
8.1. HTTP/3 CAPSULE Frame . . . . . . . . . . . . . . . . . . 10 6. The H3_DATAGRAM HTTP/3 SETTINGS Parameter . . . . . . . . . . 13
8.2. HTTP SETTINGS Parameter . . . . . . . . . . . . . . . . . 10 7. Prioritization . . . . . . . . . . . . . . . . . . . . . . . 14
8.3. Capsule Types . . . . . . . . . . . . . . . . . . . . . . 10 8. HTTP/1.x and HTTP/2 Support . . . . . . . . . . . . . . . . . 14
8.4. Context Extension Keys . . . . . . . . . . . . . . . . . 11 9. Security Considerations . . . . . . . . . . . . . . . . . . . 14
9. Normative References . . . . . . . . . . . . . . . . . . . . 11 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 14
Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 12 10.1. HTTP/3 CAPSULE Frame . . . . . . . . . . . . . . . . . . 14
A.1. CONNECT-UDP . . . . . . . . . . . . . . . . . . . . . . . 12 10.2. HTTP SETTINGS Parameter . . . . . . . . . . . . . . . . 14
A.2. CONNECT-UDP with Timestamp Extension . . . . . . . . . . 13 10.3. Capsule Types . . . . . . . . . . . . . . . . . . . . . 15
A.3. CONNECT-IP with IP compression . . . . . . . . . . . . . 14 10.4. Context Extension Types . . . . . . . . . . . . . . . . 16
A.4. WebTransport . . . . . . . . . . . . . . . . . . . . . . 15 10.5. Context Close Codes . . . . . . . . . . . . . . . . . . 16
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 16 11. Normative References . . . . . . . . . . . . . . . . . . . . 17
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 16 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 18
A.1. CONNECT-UDP . . . . . . . . . . . . . . . . . . . . . . . 18
A.2. CONNECT-UDP with Timestamp Extension . . . . . . . . . . 19
A.3. CONNECT-IP with IP compression . . . . . . . . . . . . . 19
A.4. WebTransport . . . . . . . . . . . . . . . . . . . . . . 20
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 21
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 21
1. Introduction 1. Introduction
The QUIC DATAGRAM extension [DGRAM] provides application protocols The QUIC DATAGRAM extension [DGRAM] provides application protocols
running over QUIC [QUIC] with a mechanism to send unreliable data running over QUIC [QUIC] with a mechanism to send unreliable data
while leveraging the security and congestion-control properties of while leveraging the security and congestion-control properties of
QUIC. However, QUIC DATAGRAM frames do not provide a means to QUIC. However, QUIC DATAGRAM frames do not provide a means to
demultiplex application contexts. This document describes how to use demultiplex application contexts. This document describes how to use
QUIC DATAGRAM frames when the application protocol running over QUIC QUIC DATAGRAM frames when the application protocol running over QUIC
is HTTP/3 [H3]. It associates datagrams with client-initiated is HTTP/3 [H3]. It associates datagrams with client-initiated
skipping to change at page 3, line 36 skipping to change at page 3, line 36
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
2. Multiplexing 2. Multiplexing
In order to allow multiple exchanges of datagrams to coexist on a In order to allow multiple exchanges of datagrams to coexist on a
given QUIC connection, HTTP datagrams contain two layers of given QUIC connection, HTTP datagrams contain two layers of
multiplexing. First, the QUIC DATAGRAM frame payload starts with an multiplexing. First, the QUIC DATAGRAM frame payload starts with an
encoded stream identifier that associates the datagram with a given encoded stream identifier that associates the datagram with a given
QUIC stream. Second, datagrams carry a context identifier (see QUIC stream. Second, datagrams optionally carry a context identifier
Section 2.1) that allows multiplexing multiple datagram contexts (see Section 2.1) that allows multiplexing multiple datagram contexts
related to a given HTTP request. Conceptually, the first layer of related to a given HTTP request. Conceptually, the first layer of
multiplexing is per-hop, while the second is end-to-end. multiplexing is per-hop, while the second is end-to-end.
2.1. Datagram Contexts 2.1. Datagram Contexts
Within the scope of a given HTTP request, contexts provide an Within the scope of a given HTTP request, contexts provide an
additional demultiplexing layer. Contexts determine the encoding of additional demultiplexing layer. Contexts determine the encoding of
datagrams, and can be used to implicitly convey metadata. For datagrams, and can be used to implicitly convey metadata. For
example, contexts can be used for compression to elide some parts of example, contexts can be used for compression to elide some parts of
the datagram: the context identifier then maps to a compression the datagram: the context identifier then maps to a compression
context that the receiver can use to reconstruct the elided data. context that the receiver can use to reconstruct the elided data.
Contexts are identified within the scope of a given request by a Contexts are optional, their use is negotiated on each request stream
numeric value, referred to as the context ID. A context ID is a using registration capsules, see Section 4.1 and Section 4.2. When
62-bit integer (0 to 2^62-1). contexts are used, they are identified within the scope of a given
request by a numeric value, referred to as the context ID. A context
ID is a 62-bit integer (0 to 2^62-1).
While stream IDs are a per-hop concept, context IDs are an end-to-end While stream IDs are a per-hop concept, context IDs are an end-to-end
concept. In other words, if a datagram travels through one or more concept. In other words, if a datagram travels through one or more
intermediaries on its way from client to server, the stream ID will intermediaries on its way from client to server, the stream ID will
most likely change from hop to hop, but the context ID will remain most likely change from hop to hop, but the context ID will remain
the same. Context IDs are opaque to intermediaries. the same. Context IDs are opaque to intermediaries.
2.2. Context ID Allocation 2.2. Context ID Allocation
Implementations of HTTP/3 that support the DATAGRAM extension MUST Implementations of HTTP/3 that support the DATAGRAM extension MUST
skipping to change at page 4, line 32 skipping to change at page 4, line 38
context IDs are server-initiated. This means that an HTTP/3 client context IDs are server-initiated. This means that an HTTP/3 client
implementation of the context ID allocation service MUST only provide implementation of the context ID allocation service MUST only provide
even-numbered IDs, while a server implementation MUST only provide even-numbered IDs, while a server implementation MUST only provide
odd-numbered IDs. Note that, once allocated, any context ID can be odd-numbered IDs. Note that, once allocated, any context ID can be
used by both client and server - only allocation carries separate used by both client and server - only allocation carries separate
namespaces to avoid requiring synchronization. Additionally, note namespaces to avoid requiring synchronization. Additionally, note
that the context ID namespace is tied to a given HTTP request: it is that the context ID namespace is tied to a given HTTP request: it is
possible for the same numeral context ID to be used simultaneously in possible for the same numeral context ID to be used simultaneously in
distinct requests. distinct requests.
3. HTTP/3 DATAGRAM Frame Format 3. HTTP/3 DATAGRAM Format
When used with HTTP/3, the Datagram Data field of QUIC DATAGRAM When used with HTTP/3, the Datagram Data field of QUIC DATAGRAM
frames uses the following format (using the notation from the frames uses the following format (using the notation from the
"Notational Conventions" section of [QUIC]): "Notational Conventions" section of [QUIC]):
HTTP/3 Datagram { HTTP/3 Datagram {
Quarter Stream ID (i), Quarter Stream ID (i),
Context ID (i), [Context ID (i)],
HTTP/3 Datagram Payload (..), HTTP/3 Datagram Payload (..),
} }
Figure 1: HTTP/3 DATAGRAM Frame Format Figure 1: HTTP/3 DATAGRAM Format
Quarter Stream ID: A variable-length integer that contains the value Quarter Stream ID: A variable-length integer that contains the value
of the client-initiated bidirectional stream that this datagram is of the client-initiated bidirectional stream that this datagram is
associated with, divided by four. (The division by four stems associated with, divided by four. (The division by four stems
from the fact that HTTP requests are sent on client-initiated from the fact that HTTP requests are sent on client-initiated
bidirectional streams, and those have stream IDs that are bidirectional streams, and those have stream IDs that are
divisible by four.) divisible by four.)
Context ID: A variable-length integer indicating the context ID of Context ID: A variable-length integer indicating the context ID of
the datagram (see Section 2.1). the datagram (see Section 2.1). Whether or not this field is
present depends on which registration capsules were exchanged on
the associated stream: if a REGISTER_DATAGRAM_CONTEXT capsule (see
Section 4.1) has been sent or received on this stream, then the
field is present; if a REGISTER_DATAGRAM_NO_CONTEXT capsule (see
Section 4.2) has been sent or received, then this field is absent;
if neither has been sent or received, then it is not yet possible
to parse this datagram and the receiver MUST either drop that
datagram silently or buffer it temporarily while awaiting the
registration capsule.
HTTP/3 Datagram Payload: The payload of the datagram, whose HTTP/3 Datagram Payload: The payload of the datagram, whose
semantics are defined by individual applications. Note that this semantics are defined by individual applications. Note that this
field can be empty. field can be empty.
Intermediaries parse the Quarter Stream ID field in order to Intermediaries parse the Quarter Stream ID field in order to
associate the QUIC DATAGRAM frame with a stream. If an intermediary associate the QUIC DATAGRAM frame with a stream. If an intermediary
receives a QUIC DATAGRAM frame whose payload is too short to allow receives a QUIC DATAGRAM frame whose payload is too short to allow
parsing the Quarter Stream ID field, the intermediary MUST treat it parsing the Quarter Stream ID field, the intermediary MUST treat it
as an HTTP/3 connection error of type H3_GENERAL_PROTOCOL_ERROR. as an HTTP/3 connection error of type H3_GENERAL_PROTOCOL_ERROR. The
Intermediaries MUST ignore any HTTP/3 Datagram fields after the Context ID field is optional and its use is negotiated end-to-end,
Quarter Stream ID. see Section 4.2. Therefore intermediaries cannot know whether the
Context ID field is present or absent and they MUST ignore any HTTP/3
Datagram fields after the Quarter Stream ID.
Endpoints parse both the Quarter Stream ID field and the Context ID Endpoints parse both the Quarter Stream ID field and the Context ID
field in order to associate the QUIC DATAGRAM frame with a stream and field in order to associate the QUIC DATAGRAM frame with a stream and
context within that stream. If an endpoint receives a QUIC DATAGRAM context within that stream. If an endpoint receives a QUIC DATAGRAM
frame whose payload is too short to allow parsing the Quarter Stream frame whose payload is too short to allow parsing the Quarter Stream
ID field, the endpoint MUST treat it as an HTTP/3 connection error of ID field, the endpoint MUST treat it as an HTTP/3 connection error of
type H3_GENERAL_PROTOCOL_ERROR. If an endpoint receives a QUIC type H3_GENERAL_PROTOCOL_ERROR. If an endpoint receives a QUIC
DATAGRAM frame whose payload is long enough to allow parsing the DATAGRAM frame whose payload is long enough to allow parsing the
Quarter Stream ID field but too short to allow parsing the Context ID Quarter Stream ID field but too short to allow parsing the Context ID
field, the endpoint MUST abruptly terminate the corresponding stream field, the endpoint MUST abruptly terminate the corresponding stream
with a stream error of type H3_GENERAL_PROTOCOL_ERROR. with a stream error of type H3_GENERAL_PROTOCOL_ERROR.
If a DATAGRAM frame is received and its Quarter Stream ID maps to a Endpoints MUST NOT send HTTP/3 datagrams unless the corresponding
stream that has already been closed, the receiver MUST silently drop stream's send side is open. On a given endpoint, once the receive
that frame. If a DATAGRAM frame is received and its Quarter Stream side of a stream is closed, incoming datagrams for this stream are no
ID maps to a stream that has not yet been created, the receiver SHALL longer expected so the endpoint can release related state. Endpoints
either drop that frame silently or buffer it temporarily while MAY keep state for a short time to account for reordering. Once the
awaiting the creation of the corresponding stream. state is released, the endpoint MUST silently drop received
associated datagrams.
If an HTTP/3 datagram is received and its Quarter Stream ID maps to a
stream that has not yet been created, the receiver SHALL either drop
that datagram silently or buffer it temporarily while awaiting the
creation of the corresponding stream.
4. CAPSULE HTTP/3 Frame Definition 4. CAPSULE HTTP/3 Frame Definition
CAPSULE allows reliably sending request-related information end-to- CAPSULE allows reliably sending request-related information end-to-
end, even in the presence of HTTP intermediaries. end, even in the presence of HTTP intermediaries.
CAPSULE is an HTTP/3 Frame (as opposed to a QUIC frame) which SHALL CAPSULE is an HTTP/3 Frame (as opposed to a QUIC frame) which SHALL
only be sent in client-initiated bidirectional streams. only be sent in client-initiated bidirectional streams.
Intermediaries MUST forward all received CAPSULE frames in their Intermediaries forward received CAPSULE frames on the same stream
unmodified entirety on the same stream where it would forward DATA where it would forward DATA frames. Each Capsule Type determines
frames. Intermediaries MUST NOT send any CAPSULE frames other than whether it is opaque or transparent to intermediaries: opaque
the ones it is forwarding. capsules are forwarded unmodified while transparent ones can be
parsed, added, or removed by intermediaries.
This specification of CAPSULE currently uses HTTP/3 frame type This specification of CAPSULE currently uses HTTP/3 frame type
0xffcab5. If this document is approved, a lower number will be 0xffcab5. If this document is approved, a lower number will be
requested from IANA. requested from IANA.
CAPSULE HTTP/3 Frame { CAPSULE HTTP/3 Frame {
Type (i) = 0xffcab5, Type (i) = 0xffcab5,
Length (i), Length (i),
Capsule Type (i), Capsule Type (i),
Capsule Data (..), Capsule Data (..),
skipping to change at page 6, line 21 skipping to change at page 7, line 5
Figure 2: CAPSULE HTTP/3 Frame Format Figure 2: CAPSULE HTTP/3 Frame Format
The Type and Length fields follows the definition of HTTP/3 frames The Type and Length fields follows the definition of HTTP/3 frames
from [H3]. The payload consists of: from [H3]. The payload consists of:
Capsule Type: The type of this capsule. Capsule Type: The type of this capsule.
Capsule Data: Data whose semantics depends on the Capsule Type. Capsule Data: Data whose semantics depends on the Capsule Type.
Unless otherwise specified, all Capsule Types are defined as opaque
to intermediaries. Intermediaries MUST forward all received opaque
CAPSULE frames in their unmodified entirety. Intermediaries MUST NOT
send any opaque CAPSULE frames other than the ones it is forwarding.
All Capsule Types defined in this document are opaque, with the
exception of the DATAGRAM Capsule, see Section 4.4. Definitions of
new Capsule Types MAY specify that the newly introduced type is
transparent. Intermediaries MUST treat unknown Capsule Types as
opaque.
Intermediaries respect the order of opaque CAPSULE frames: if an
intermediary receives two opaque CAPSULE frames in a given order, it
MUST forward them in the same order.
Endpoints which receive a Capsule with an unknown Capsule Type MUST Endpoints which receive a Capsule with an unknown Capsule Type MUST
silently drop that Capsule. Intermediaries MUST forward Capsules, silently drop that Capsule.
even if they do not know the Capsule Type or cannot parse the Capsule
Data. Receipt of a CAPSULE HTTP/3 Frame on a stream that is not a client-
initiated bidirectional stream MUST be treated as a connection error
of type H3_FRAME_UNEXPECTED.
4.1. The REGISTER_DATAGRAM_CONTEXT Capsule 4.1. The REGISTER_DATAGRAM_CONTEXT Capsule
The REGISTER_DATAGRAM_CONTEXT capsule (type=0x00) allows an endpoint The REGISTER_DATAGRAM_CONTEXT capsule (type=0x00) allows an endpoint
to inform its peer of the encoding and semantics of datagrams to inform its peer of the encoding and semantics of datagrams
associated with a given context ID. Its Capsule Data field consists associated with a given context ID. Its Capsule Data field consists
of: of:
REGISTER_DATAGRAM_CONTEXT Capsule { REGISTER_DATAGRAM_CONTEXT Capsule {
Context ID (i), Context ID (i),
Extension String (..), Context Extensions (..),
} }
Figure 3: REGISTER_DATAGRAM_CONTEXT Capsule Format Figure 3: REGISTER_DATAGRAM_CONTEXT Capsule Format
Context ID: The context ID to register. Context ID: The context ID to register.
Extension String: A string of comma-separated key-value pairs to Context Extensions: See Section 5.
enable extensibility. Keys are registered with IANA, see
Section 8.4.
The ABNF for the Extension String field is as follows (using syntax
from Section 3.2.6 of [RFC7230]):
extension-string = [ ext-member *( "," ext-member ) ]
ext-member = ext-member-key "=" ext-member-value
ext-member-key = token
ext-member-value = token
Note that these registrations are unilateral and bidirectional: the Note that these registrations are unilateral and bidirectional: the
sender of the frame unilaterally defines the semantics it will apply sender of the frame unilaterally defines the semantics it will apply
to the datagrams it sends and receives using this context ID. Once a to the datagrams it sends and receives using this context ID. Once a
context ID is registered, it can be used in both directions. context ID is registered, it can be used in both directions.
Endpoints MUST NOT send DATAGRAM frames using a Context ID until they Endpoints MUST NOT send DATAGRAM frames using a Context ID until they
have either sent or received a REGISTER_DATAGRAM_CONTEXT Capsule with have either sent or received a REGISTER_DATAGRAM_CONTEXT Capsule with
the same Context ID. However, due to reordering, an endpoint that the same Context ID. However, due to reordering, an endpoint that
receives a DATAGRAM frame with an unknown Context ID MUST NOT treat receives a DATAGRAM frame with an unknown Context ID MUST NOT treat
skipping to change at page 7, line 27 skipping to change at page 8, line 17
Endpoints MUST NOT register the same Context ID twice on the same Endpoints MUST NOT register the same Context ID twice on the same
stream. This also applies to Context IDs that have been closed using stream. This also applies to Context IDs that have been closed using
a CLOSE_DATAGRAM_CONTEXT capsule. Clients MUST NOT register server- a CLOSE_DATAGRAM_CONTEXT capsule. Clients MUST NOT register server-
initiated Context IDs and servers MUST NOT register client-initiated initiated Context IDs and servers MUST NOT register client-initiated
Context IDs. If an endpoint receives a REGISTER_DATAGRAM_CONTEXT Context IDs. If an endpoint receives a REGISTER_DATAGRAM_CONTEXT
capsule that violates one or more of these requirements, the endpoint capsule that violates one or more of these requirements, the endpoint
MUST abruptly terminate the corresponding stream with a stream error MUST abruptly terminate the corresponding stream with a stream error
of type H3_GENERAL_PROTOCOL_ERROR. of type H3_GENERAL_PROTOCOL_ERROR.
4.2. The CLOSE_DATAGRAM_CONTEXT Capsule Endpoints MUST NOT send a REGISTER_DATAGRAM_CONTEXT capsule on a
stream before they have sent at least one HEADERS frame on that
stream. This removes the need to buffer REGISTER_DATAGRAM_CONTEXT
capsules when the endpoint needs information from headers to
determine how to react to the capsule. If an endpoint receives a
REGISTER_DATAGRAM_CONTEXT capsule on a stream that hasn't yet
received a HEADERS frame, the endpoint MUST abruptly terminate the
corresponding stream with a stream error of type
H3_GENERAL_PROTOCOL_ERROR.
Servers MUST NOT send a REGISTER_DATAGRAM_CONTEXT capsule on a stream
before they have received at least one REGISTER_DATAGRAM_CONTEXT
capsule or one REGISTER_DATAGRAM_NO_CONTEXT capsule from the client
on that stream. This ensures that clients control whether datagrams
are allowed for a given request. If a client receives a
REGISTER_DATAGRAM_CONTEXT capsule on a stream where the client has
not yet sent a REGISTER_DATAGRAM_CONTEXT capsule, the client MUST
abruptly terminate the corresponding stream with a stream error of
type H3_GENERAL_PROTOCOL_ERROR.
Servers MUST NOT send a REGISTER_DATAGRAM_CONTEXT capsule on a stream
where it has received a REGISTER_DATAGRAM_NO_CONTEXT capsule. If a
client receives a REGISTER_DATAGRAM_CONTEXT capsule on a stream where
the client has sent a REGISTER_DATAGRAM_NO_CONTEXT capsule, the
client MUST abruptly terminate the corresponding stream with a stream
error of type H3_GENERAL_PROTOCOL_ERROR.
4.2. The REGISTER_DATAGRAM_NO_CONTEXT Capsule
The REGISTER_DATAGRAM_NO_CONTEXT capsule (type=0x03) allows a client
to inform the server that datagram contexts will not be used with
this stream. It also informs the server of the encoding and
semantics of datagrams associated with this stream. Its Capsule Data
field consists of:
REGISTER_DATAGRAM_NO_CONTEXT Capsule {
Context Extensions (..),
}
Figure 4: REGISTER_DATAGRAM_NO_CONTEXT Capsule Format
Context Extensions: See Section 5.
Note that this registration is unilateral and bidirectional: the
client unilaterally defines the semantics it will apply to the
datagrams it sends and receives with this stream.
Endpoints MUST NOT send DATAGRAM frames without a Context ID until
they have either sent or received a REGISTER_DATAGRAM_NO_CONTEXT
Capsule. However, due to reordering, an endpoint that receives a
DATAGRAM frame before receiving either a REGISTER_DATAGRAM_CONTEXT
capsule or a REGISTER_DATAGRAM_NO_CONTEXT capsule MUST NOT treat it
as an error, it SHALL instead drop the DATAGRAM frame silently, or
buffer it temporarily while awaiting a REGISTER_DATAGRAM_NO_CONTEXT
capsule or the corresponding REGISTER_DATAGRAM_CONTEXT capsule.
Servers MUST NOT send the REGISTER_DATAGRAM_NO_CONTEXT capsule. If a
client receives a REGISTER_DATAGRAM_NO_CONTEXT capsule, the client
MUST abruptly terminate the corresponding stream with a stream error
of type H3_GENERAL_PROTOCOL_ERROR.
Clients MUST NOT send more than one REGISTER_DATAGRAM_NO_CONTEXT
capsule on a stream. If a server receives a second
REGISTER_DATAGRAM_NO_CONTEXT capsule on the same stream, the server
MUST abruptly terminate the corresponding stream with a stream error
of type H3_GENERAL_PROTOCOL_ERROR.
Clients MUST NOT send a REGISTER_DATAGRAM_NO_CONTEXT capsule on a
stream before they have sent at least one HEADERS frame on that
stream. This removes the need to buffer REGISTER_DATAGRAM_CONTEXT
capsules when the server needs information from headers to determine
how to react to the capsule. If a server receives a
REGISTER_DATAGRAM_NO_CONTEXT capsule on a stream that hasn't yet
received a HEADERS frame, the server MUST abruptly terminate the
corresponding stream with a stream error of type
H3_GENERAL_PROTOCOL_ERROR.
Clients MUST NOT send both REGISTER_DATAGRAM_CONTEXT capsules and
REGISTER_DATAGRAM_NO_CONTEXT capsules on the same stream. If a
server receives both a REGISTER_DATAGRAM_CONTEXT capsule and a
REGISTER_DATAGRAM_NO_CONTEXT capsule on the same stream, the server
MUST abruptly terminate the corresponding stream with a stream error
of type H3_GENERAL_PROTOCOL_ERROR.
Extensions MAY define a different mechanism to negotiate the presence
of contexts, and they MAY do so in a way which is opaque to
intermediaries.
4.3. The CLOSE_DATAGRAM_CONTEXT Capsule
The CLOSE_DATAGRAM_CONTEXT capsule (type=0x01) allows an endpoint to The CLOSE_DATAGRAM_CONTEXT capsule (type=0x01) allows an endpoint to
inform its peer that it will no longer send or parse received inform its peer that it will no longer send or parse received
datagrams associated with a given context ID. Its Capsule Data field datagrams associated with a given context ID. Its Capsule Data field
consists of: consists of:
CLOSE_DATAGRAM_CONTEXT Capsule { CLOSE_DATAGRAM_CONTEXT Capsule {
Context ID (i), Context ID (i),
Extension String (..), Context Extensions (..),
} }
Figure 4: CLOSE_DATAGRAM_CONTEXT Capsule Format Figure 5: CLOSE_DATAGRAM_CONTEXT Capsule Format
Context ID: The context ID to close. Context ID: The context ID to close.
Extension String: A string of comma-separated key-value pairs to Context Extensions: See Section 5.
enable extensibility, see the definition of the same field in
Section 4.1 for details.
Note that this close is unilateral and bidirectional: the sender of Note that this close is unilateral and bidirectional: the sender of
the frame unilaterally informs its peer of the closure. Endpoints the frame unilaterally informs its peer of the closure. Endpoints
can use CLOSE_DATAGRAM_CONTEXT capsules to close a context that was can use CLOSE_DATAGRAM_CONTEXT capsules to close a context that was
initially registered by either themselves, or by their peer. initially registered by either themselves, or by their peer.
Endpoints MAY use the CLOSE_DATAGRAM_CONTEXT capsule to immediately Endpoints MAY use the CLOSE_DATAGRAM_CONTEXT capsule to immediately
reject a context that was just registered using a reject a context that was just registered using a
REGISTER_DATAGRAM_CONTEXT capsule if they find its Extension String REGISTER_DATAGRAM_CONTEXT capsule if they find its Context Extensions
to be unacceptable. field to be unacceptable.
After an endpoint has either sent or received a After an endpoint has either sent or received a
CLOSE_DATAGRAM_CONTEXT frame, it MUST NOT send any DATAGRAM frames CLOSE_DATAGRAM_CONTEXT frame, it MUST NOT send any DATAGRAM frames
with that Context ID. However, due to reordering, an endpoint that with that Context ID. However, due to reordering, an endpoint that
receives a DATAGRAM frame with a closed Context ID MUST NOT treat it receives a DATAGRAM frame with a closed Context ID MUST NOT treat it
as an error, it SHALL instead drop the DATAGRAM frame silently. as an error, it SHALL instead drop the DATAGRAM frame silently.
Endpoints MUST NOT close a Context ID that was not previously Endpoints MUST NOT close a Context ID that was not previously
registered. Endpoints MUST NOT close a Context ID that has already registered. Endpoints MUST NOT close a Context ID that has already
been closed. If an endpoint receives a CLOSE_DATAGRAM_CONTEXT been closed. If an endpoint receives a CLOSE_DATAGRAM_CONTEXT
capsule that violates one or more of these requirements, the endpoint capsule that violates one or more of these requirements, the endpoint
MUST abruptly terminate the corresponding stream with a stream error MUST abruptly terminate the corresponding stream with a stream error
of type H3_GENERAL_PROTOCOL_ERROR. of type H3_GENERAL_PROTOCOL_ERROR.
4.3. The DATAGRAM Capsule All CLOSE_DATAGRAM_CONTEXT capsules MUST contain a CLOSE_CODE context
extension, see Section 5.1. If an endpoint receives a
CLOSE_DATAGRAM_CONTEXT capsule without a CLOSE_CODE context
extension, the endpoint MUST abruptly terminate the corresponding
stream with a stream error of type H3_GENERAL_PROTOCOL_ERROR.
4.4. The DATAGRAM Capsule
The DATAGRAM capsule (type=0x02) allows an endpoint to send a The DATAGRAM capsule (type=0x02) allows an endpoint to send a
datagram frame over an HTTP stream. This is particularly useful when datagram frame over an HTTP stream. This is particularly useful when
using a version of HTTP that does not support QUIC DATAGRAM frames. using a version of HTTP that does not support QUIC DATAGRAM frames.
Its Capsule Data field consists of: Its Capsule Data field consists of:
DATAGRAM Capsule { DATAGRAM Capsule {
Context ID (i), [Context ID (i)],
HTTP/3 Datagram Payload (..), HTTP/3 Datagram Payload (..),
} }
Figure 5: DATAGRAM Capsule Format Figure 6: DATAGRAM Capsule Format
Context ID: A variable-length integer indicating the context ID of Context ID: A variable-length integer indicating the context ID of
the datagram (see Section 2.1). the datagram (see Section 2.1). Whether or not this field is
present depends on which registration capsules were exchanged on
the associated stream: if a REGISTER_DATAGRAM_CONTEXT capsule (see
Section 4.1) has been sent or received on this stream, then the
field is present; if a REGISTER_DATAGRAM_NO_CONTEXT capsule (see
Section 4.2) has been sent or received, then this field is absent;
if neither has been sent or received, then it is not yet possible
to parse this datagram and the receiver MUST either drop that
datagram silently or buffer it temporarily while awaiting the
registration capsule.
HTTP/3 Datagram Payload: The payload of the datagram, whose HTTP/3 Datagram Payload: The payload of the datagram, whose
semantics are defined by individual applications. Note that this semantics are defined by individual applications. Note that this
field can be empty. field can be empty.
Datagrams sent using the DATAGRAM Capsule have the exact same Datagrams sent using the DATAGRAM Capsule have the exact same
semantics as datagrams sent in QUIC DATAGRAM frames. semantics as datagrams sent in QUIC DATAGRAM frames. In particular,
the restrictions on when it is allowed to send an HTTP/3 datagram and
how to process them from Section 3 also apply to HTTP/3 datagrams
sent and received using the DATAGRAM capsule.
5. The H3_DATAGRAM HTTP/3 SETTINGS Parameter The DATAGRAM Capsule is transparent to intermediaries, meaning that
intermediaries MAY parse it and send DATAGRAM Capsules that they did
not receive. This allows an intermediary to reencode HTTP/3
Datagrams as it forwards them: in other words, an intermediary MAY
send a DATAGRAM Capsule to forward an HTTP/3 Datagram which was
received in a QUIC DATAGRAM frame, and vice versa.
Note that while DATAGRAM capsules are sent on a stream,
intermediaries can reencode HTTP/3 datagrams into QUIC DATAGRAM
frames over the next hop, and those could be dropped. Because of
this, applications have to always consider HTTP/3 datagrams to be
unreliable, even if they were initially sent in a capsule.
5. Context Extensibility
In order to facilitate extensibility of contexts, the
REGISTER_DATAGRAM_CONTEXT, REGISTER_DATAGRAM_NO_CONTEXT, and the
CLOSE_DATAGRAM_CONTEXT capsules carry a Context Extensions field.
That field contains a sequence of context extensions:
Context Extensions {
Context Extension (..) ...,
}
Each context extension is encoded as a (type, length, value) tuple:
Context Extension {
Context Extension Type (i),
Context Extension Length (i),
Context Extension Value (..),
}
Context Extension Types are registered with IANA, see Section 10.4.
The Context Extension Length field contains the length of the Context
Extension Value field in bytes. The semantics of the Context
Extension Value field are defined by the corresponding Context
Extension Type.
5.1. The CLOSE_CODE Context Extension Type
The CLOSE_CODE context extension type (type=0x00) allows an endpoint
to provide additional information as to why a datagram context was
closed. This type SHALL only be sent in CLOSE_DATAGRAM_CONTEXT
capsules. Its Context Extension Value field consists of a single
variable-length integer which contains the close code. The following
codes are defined:
NO_ERROR (code=0x00): This indicates that the registration was
closed without any additional information.
DENIED (code=0x01): This indicates that the sender has rejected the
context registration based on its local policy. The endpoint that
had originally registered this context MUST NOT try to register
another context with the same context extensions on this stream.
RESOURCE_LIMIT (code=0x02): This indicates that the context was
closed to save resources. The recipient SHOULD limit its future
registration of resource-incentive contexts.
Receipt of an unknown close code MUST be treated as if the NO_ERROR
code was present. Close codes are registered with IANA, see
Section 10.5.
5.2. The DETAILS Context Extension Type
The DETAILS context extension type (type=0x01) allows an endpoint to
provide additional details to context capsules. It is meant for
debugging purposes. Its Context Extension Value field consists of a
human-readable string encoded in UTF-8.
6. The H3_DATAGRAM HTTP/3 SETTINGS Parameter
Implementations of HTTP/3 that support this mechanism can indicate Implementations of HTTP/3 that support this mechanism can indicate
that to their peer by sending the H3_DATAGRAM SETTINGS parameter with that to their peer by sending the H3_DATAGRAM SETTINGS parameter with
a value of 1. The value of the H3_DATAGRAM SETTINGS parameter MUST a value of 1. The value of the H3_DATAGRAM SETTINGS parameter MUST
be either 0 or 1. A value of 0 indicates that this mechanism is not be either 0 or 1. A value of 0 indicates that this mechanism is not
supported. An endpoint that receives the H3_DATAGRAM SETTINGS supported. An endpoint that receives the H3_DATAGRAM SETTINGS
parameter with a value that is neither 0 or 1 MUST terminate the parameter with a value that is neither 0 or 1 MUST terminate the
connection with error H3_SETTINGS_ERROR. connection with error H3_SETTINGS_ERROR.
An endpoint that sends the H3_DATAGRAM SETTINGS parameter with a An endpoint that sends the H3_DATAGRAM SETTINGS parameter with a
skipping to change at page 9, line 35 skipping to change at page 14, line 5
0-RTT data, they MUST send a H3_DATAGRAM SETTINGS parameter greater 0-RTT data, they MUST send a H3_DATAGRAM SETTINGS parameter greater
than or equal to the value they sent to the client in the connection than or equal to the value they sent to the client in the connection
where they sent them the NewSessionTicket message. If a client where they sent them the NewSessionTicket message. If a client
stores the value of the H3_DATAGRAM SETTINGS parameter with their stores the value of the H3_DATAGRAM SETTINGS parameter with their
0-RTT state, they MUST validate that the new value of the H3_DATAGRAM 0-RTT state, they MUST validate that the new value of the H3_DATAGRAM
SETTINGS parameter sent by the server in the handshake is greater SETTINGS parameter sent by the server in the handshake is greater
than or equal to the stored value; if not, the client MUST terminate than or equal to the stored value; if not, the client MUST terminate
the connection with error H3_SETTINGS_ERROR. In all cases, the the connection with error H3_SETTINGS_ERROR. In all cases, the
maximum permitted value of the H3_DATAGRAM SETTINGS parameter is 1. maximum permitted value of the H3_DATAGRAM SETTINGS parameter is 1.
6. HTTP/1.x and HTTP/2 Support 7. Prioritization
Prioritization of HTTP/3 datagrams is not defined in this document.
Future extensions MAY define how to prioritize datagrams, and MAY
define signaling to allow endpoints to communicate their
prioritization preferences.
8. HTTP/1.x and HTTP/2 Support
We can provide DATAGRAM support in HTTP/2 by defining the CAPSULE We can provide DATAGRAM support in HTTP/2 by defining the CAPSULE
frame in HTTP/2. frame in HTTP/2.
We can provide DATAGRAM support in HTTP/1.x by defining its data We can provide DATAGRAM support in HTTP/1.x by defining its data
stream format to a sequence of length-value capsules. stream format to a sequence of length-value capsules.
TODO: Refactor this document into "HTTP Datagrams" with definitions TODO: Refactor this document into "HTTP Datagrams" with definitions
for HTTP/1.x, HTTP/2, and HTTP/3. for HTTP/1.x, HTTP/2, and HTTP/3.
7. Security Considerations 9. Security Considerations
Since this feature requires sending an HTTP/3 Settings parameter, it Since this feature requires sending an HTTP/3 Settings parameter, it
"sticks out". In other words, probing clients can learn whether a "sticks out". In other words, probing clients can learn whether a
server supports this feature. Implementations that support this server supports this feature. Implementations that support this
feature SHOULD always send this Settings parameter to avoid leaking feature SHOULD always send this Settings parameter to avoid leaking
the fact that there are applications using HTTP/3 datagrams enabled the fact that there are applications using HTTP/3 datagrams enabled
on this endpoint. on this endpoint.
8. IANA Considerations 10. IANA Considerations
8.1. HTTP/3 CAPSULE Frame 10.1. HTTP/3 CAPSULE Frame
This document will request IANA to register the following entry in This document will request IANA to register the following entry in
the "HTTP/3 Frames" registry: the "HTTP/3 Frames" registry:
+------------+----------+---------------+ +------------+----------+---------------+
| Frame Type | Value | Specification | | Frame Type | Value | Specification |
+============+==========+===============+ +============+==========+===============+
| CAPSULE | 0xffcab5 | This Document | | CAPSULE | 0xffcab5 | This Document |
+------------+----------+---------------+ +------------+----------+---------------+
8.2. HTTP SETTINGS Parameter 10.2. HTTP SETTINGS Parameter
This document will request IANA to register the following entry in This document will request IANA to register the following entry in
the "HTTP/3 Settings" registry: the "HTTP/3 Settings" registry:
+--------------+----------+---------------+---------+ +--------------+----------+---------------+---------+
| Setting Name | Value | Specification | Default | | Setting Name | Value | Specification | Default |
+==============+==========+===============+=========+ +==============+==========+===============+=========+
| H3_DATAGRAM | 0xffd276 | This Document | 0 | | H3_DATAGRAM | 0xffd276 | This Document | 0 |
+--------------+----------+---------------+---------+ +--------------+----------+---------------+---------+
8.3. Capsule Types 10.3. Capsule Types
This document establishes a registry for HTTP/3 frame type codes. This document establishes a registry for HTTP/3 capsule type codes.
The "HTTP Capsule Types" registry governs a 62-bit space. The "HTTP Capsule Types" registry governs a 62-bit space.
Registrations in this registry MUST include the following fields: Registrations in this registry MUST include the following fields:
Type: Type:
A name or label for the capsule type. A name or label for the capsule type.
Value: The value of the Capsule Type field (see Section 4) is a Value: The value of the Capsule Type field (see Section 4) is a
62bit integer. 62bit integer.
Reference: An optional reference to a specification for the type. Reference: An optional reference to a specification for the type.
This field MAY be empty. This field MAY be empty.
Registrations follow the "First Come First Served" policy (see Registrations follow the "First Come First Served" policy (see
Section 4.4 of [IANA-POLICY]) where two registrations MUST NOT have Section 4.4 of [IANA-POLICY]) where two registrations MUST NOT have
the same Type. the same Type.
This registry initially contains the following entries: This registry initially contains the following entries:
+---------------------------+-------+---------------+ +------------------------------+-------+---------------+
| Capsule Type | Value | Specification | | Capsule Type | Value | Specification |
+---------------------------+-------+---------------+ +------------------------------+-------+---------------+
| REGISTER_DATAGRAM_CONTEXT | 0x00 | This Document | | REGISTER_DATAGRAM_CONTEXT | 0x00 | This Document |
+---------------------------+-------+---------------+ +------------------------------+-------+---------------+
| CLOSE_DATAGRAM_CONTEXT | 0x01 | This Document | | CLOSE_DATAGRAM_CONTEXT | 0x01 | This Document |
+---------------------------+-------+---------------+ +------------------------------+-------+---------------+
| DATAGRAM | 0x02 | This Document | | DATAGRAM | 0x02 | This Document |
+---------------------------+-------+---------------+ +------------------------------+-------+---------------+
| REGISTER_DATAGRAM_NO_CONTEXT | 0x03 | This Document |
+------------------------------+-------+---------------+
8.4. Context Extension Keys Capsule types with a value of the form 41 * N + 23 for integer values
of N are reserved to exercise the requirement that unknown capsule
types be ignored. These capsules have no semantics and can carry
arbitrary values. These values MUST NOT be assigned by IANA and MUST
NOT appear in the listing of assigned values.
REGISTER_DATAGRAM_CONTEXT capsules carry key-value pairs, see 10.4. Context Extension Types
Section 4.1. This document will request IANA to create an "HTTP
Datagram Context Extension Keys" registry. Registrations in this
registry MUST include the following fields:
Key: The key (see Section 4.1). Keys MUST be valid tokens as This document establishes a registry for HTTP/3 datagram context
defined in Section 3.2.6 of [RFC7230]. extension type codes. The "HTTP Context Extension Types" registry
governs a 62-bit space. Registrations in this registry MUST include
the following fields:
Description: A brief description of the key semantics, which MAY be Type:
a summary if a specification reference is provided.
A name or label for the context extension type.
Value: The value of the Context Extension Type field (see Section 5)
is a 62bit integer.
Reference: An optional reference to a specification for the Reference: An optional reference to a specification for the
parameter. This field MAY be empty. parameter. This field MAY be empty.
Registrations follow the "First Come First Served" policy (see Registrations follow the "First Come First Served" policy (see
Section 4.4 of [IANA-POLICY]) where two registrations MUST NOT have Section 4.4 of [IANA-POLICY]) where two registrations MUST NOT have
the same Key. This registry is initially empty. the same Type nor Value.
9. Normative References This registry initially contains the following entries:
+------------------------------+-------+---------------+
| Context Extension Type | Value | Specification |
+------------------------------+-------+---------------+
| CLOSE_CODE | 0x00 | This Document |
+------------------------------+-------+---------------+
| DETAILS | 0x01 | This Document |
+------------------------------+-------+---------------+
Context extension types with a value of the form 41 * N + 17 for
integer values of N are reserved to exercise the requirement that
unknown context extension types be ignored. These extensions have no
semantics and can carry arbitrary values. These values MUST NOT be
assigned by IANA and MUST NOT appear in the listing of assigned
values.
10.5. Context Close Codes
This document establishes a registry for HTTP/3 context extension
type codes. The "HTTP Context Close Codes" registry governs a 62-bit
space. Registrations in this registry MUST include the following
fields:
Type:
A name or label for the close code.
Value: The value of the CLOSE_CODE Context Extension Value field
(see Section 5.1) is a 62bit integer.
Reference: An optional reference to a specification for the
parameter. This field MAY be empty.
Registrations follow the "First Come First Served" policy (see
Section 4.4 of [IANA-POLICY]) where two registrations MUST NOT have
the same Type nor Value.
This registry initially contains the following entries:
+------------------------------+-------+---------------+
| Context Close Code | Value | Specification |
+------------------------------+-------+---------------+
| NO_ERROR | 0x00 | This Document |
+------------------------------+-------+---------------+
| DENIED | 0x01 | This Document |
+------------------------------+-------+---------------+
| RESOURCE_LIMIT | 0x02 | This Document |
+------------------------------+-------+---------------+
Context close codes with a value of the form 41 * N + 19 for integer
values of N are reserved to exercise the requirement that unknown
context close codes be treated as NO_ERROR. These values MUST NOT be
assigned by IANA and MUST NOT appear in the listing of assigned
values.
11. Normative References
[DGRAM] Pauly, T., Kinnear, E., and D. Schinazi, "An Unreliable [DGRAM] Pauly, T., Kinnear, E., and D. Schinazi, "An Unreliable
Datagram Extension to QUIC", Work in Progress, Internet- Datagram Extension to QUIC", Work in Progress, Internet-
Draft, draft-ietf-quic-datagram-02, 16 February 2021, Draft, draft-ietf-quic-datagram-02, 16 February 2021,
<https://tools.ietf.org/html/draft-ietf-quic-datagram-02>. <https://tools.ietf.org/html/draft-ietf-quic-datagram-02>.
[H3] Bishop, M., "Hypertext Transfer Protocol Version 3 [H3] Bishop, M., "Hypertext Transfer Protocol Version 3
(HTTP/3)", Work in Progress, Internet-Draft, draft-ietf- (HTTP/3)", Work in Progress, Internet-Draft, draft-ietf-
quic-http-34, 2 February 2021, quic-http-34, 2 February 2021,
<https://tools.ietf.org/html/draft-ietf-quic-http-34>. <https://tools.ietf.org/html/draft-ietf-quic-http-34>.
skipping to change at page 12, line 22 skipping to change at page 18, line 16
and Secure Transport", Work in Progress, Internet-Draft, and Secure Transport", Work in Progress, Internet-Draft,
draft-ietf-quic-transport-34, 14 January 2021, draft-ietf-quic-transport-34, 14 January 2021,
<https://tools.ietf.org/html/draft-ietf-quic-transport- <https://tools.ietf.org/html/draft-ietf-quic-transport-
34>. 34>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/rfc/rfc2119>. <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing",
RFC 7230, DOI 10.17487/RFC7230, June 2014,
<https://www.rfc-editor.org/rfc/rfc7230>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/rfc/rfc8174>. May 2017, <https://www.rfc-editor.org/rfc/rfc8174>.
Appendix A. Examples Appendix A. Examples
A.1. CONNECT-UDP A.1. CONNECT-UDP
Client Server Client Server
STREAM(44): HEADERS --------> STREAM(44): HEADERS -------->
:method = CONNECT-UDP :method = CONNECT-UDP
:scheme = https :scheme = https
:path = / :path = /
:authority = target.example.org:443 :authority = target.example.org:443
STREAM(44): CAPSULE --------> STREAM(44): CAPSULE -------->
Capsule Type = REGISTER_DATAGRAM_CONTEXT Capsule Type = REGISTER_DATAGRAM_CONTEXT
skipping to change at page 13, line 15 skipping to change at page 18, line 35
STREAM(44): HEADERS --------> STREAM(44): HEADERS -------->
:method = CONNECT-UDP :method = CONNECT-UDP
:scheme = https :scheme = https
:path = / :path = /
:authority = target.example.org:443 :authority = target.example.org:443
STREAM(44): CAPSULE --------> STREAM(44): CAPSULE -------->
Capsule Type = REGISTER_DATAGRAM_CONTEXT Capsule Type = REGISTER_DATAGRAM_CONTEXT
Context ID = 0 Context ID = 0
Extension String = "" Context Extension = {}
DATAGRAM --------> DATAGRAM -------->
Quarter Stream ID = 11 Quarter Stream ID = 11
Context ID = 0 Context ID = 0
Payload = Encapsulated UDP Payload Payload = Encapsulated UDP Payload
<-------- STREAM(44): HEADERS <-------- STREAM(44): HEADERS
:status = 200 :status = 200
/* Wait for target server to respond to UDP packet. */ /* Wait for target server to respond to UDP packet. */
skipping to change at page 14, line 15 skipping to change at page 19, line 18
STREAM(44): HEADERS --------> STREAM(44): HEADERS -------->
:method = CONNECT-UDP :method = CONNECT-UDP
:scheme = https :scheme = https
:path = / :path = /
:authority = target.example.org:443 :authority = target.example.org:443
STREAM(44): CAPSULE --------> STREAM(44): CAPSULE -------->
Capsule Type = REGISTER_DATAGRAM_CONTEXT Capsule Type = REGISTER_DATAGRAM_CONTEXT
Context ID = 0 Context ID = 0
Extension String = "" Context Extension = {}
DATAGRAM --------> DATAGRAM -------->
Quarter Stream ID = 11 Quarter Stream ID = 11
Context ID = 0 Context ID = 0
Payload = Encapsulated UDP Payload Payload = Encapsulated UDP Payload
<-------- STREAM(44): HEADERS <-------- STREAM(44): HEADERS
:status = 200 :status = 200
/* Wait for target server to respond to UDP packet. */ /* Wait for target server to respond to UDP packet. */
<-------- DATAGRAM <-------- DATAGRAM
Quarter Stream ID = 11 Quarter Stream ID = 11
Context ID = 0 Context ID = 0
Payload = Encapsulated UDP Payload Payload = Encapsulated UDP Payload
STREAM(44): CAPSULE --------> STREAM(44): CAPSULE -------->
Capsule Type = REGISTER_DATAGRAM_CONTEXT Capsule Type = REGISTER_DATAGRAM_CONTEXT
Context ID = 2 Context ID = 2
Extension String = "timestamp" Context Extension = {TIMESTAMP=""}
DATAGRAM --------> DATAGRAM -------->
Quarter Stream ID = 11 Quarter Stream ID = 11
Context ID = 2 Context ID = 2
Payload = Encapsulated UDP Payload With Timestamp Payload = Encapsulated UDP Payload With Timestamp
A.3. CONNECT-IP with IP compression A.3. CONNECT-IP with IP compression
Client Server Client Server
STREAM(44): HEADERS --------> STREAM(44): HEADERS -------->
:method = CONNECT-IP :method = CONNECT-IP
:scheme = https :scheme = https
:path = / :path = /
:authority = proxy.example.org:443 :authority = proxy.example.org:443
<-------- STREAM(44): HEADERS <-------- STREAM(44): HEADERS
:status = 200 :status = 200
/* Exchange CONNECT-IP configuration information. */ /* Exchange CONNECT-IP configuration information. */
STREAM(44): CAPSULE --------> STREAM(44): CAPSULE -------->
Capsule Type = REGISTER_DATAGRAM_CONTEXT Capsule Type = REGISTER_DATAGRAM_CONTEXT
Context ID = 0 Context ID = 0
Extension String = "" Context Extension = {}
DATAGRAM --------> DATAGRAM -------->
Quarter Stream ID = 11 Quarter Stream ID = 11
Context ID = 0 Context ID = 0
Payload = Encapsulated IP Packet Payload = Encapsulated IP Packet
/* Endpoint happily exchange encapsulated IP packets */ /* Endpoint happily exchange encapsulated IP packets */
/* using Quarter Stream ID 11 and Context ID 0. */ /* using Quarter Stream ID 11 and Context ID 0. */
DATAGRAM --------> DATAGRAM -------->
Quarter Stream ID = 11 Quarter Stream ID = 11
Context ID = 0 Context ID = 0
Payload = Encapsulated IP Packet Payload = Encapsulated IP Packet
/* After performing some analysis on traffic patterns, */ /* After performing some analysis on traffic patterns, */
/* the client decides it wants to compress a 5-tuple. */ /* the client decides it wants to compress a 5-tuple. */
STREAM(44): CAPSULE --------> STREAM(44): CAPSULE -------->
Capsule Type = REGISTER_DATAGRAM_CONTEXT Capsule Type = REGISTER_DATAGRAM_CONTEXT
Context ID = 2 Context ID = 2
Extension String = "ip=192.0.2.42,port=443" Context Extension = {IP_COMPRESSION=tcp,192.0.2.6:9876,192.0.2.7:443}
DATAGRAM --------> DATAGRAM -------->
Quarter Stream ID = 11 Quarter Stream ID = 11
Context ID = 2 Context ID = 2
Payload = Compressed IP Packet Payload = Compressed IP Packet
A.4. WebTransport A.4. WebTransport
Client Server Client Server
STREAM(44): HEADERS --------> STREAM(44): HEADERS -------->
:method = CONNECT :method = CONNECT
:scheme = https :scheme = https
:method = webtransport :method = webtransport
:path = /hello :path = /hello
:authority = webtransport.example.org:443 :authority = webtransport.example.org:443
Origin = https://www.example.org:443 Origin = https://www.example.org:443
STREAM(44): CAPSULE --------> STREAM(44): CAPSULE -------->
Capsule Type = REGISTER_DATAGRAM_CONTEXT Capsule Type = REGISTER_DATAGRAM_NO_CONTEXT
Context ID = 0 Context Extension = {}
Extension String = ""
<-------- STREAM(44): HEADERS <-------- STREAM(44): HEADERS
:status = 200 :status = 200
/* Both endpoints can now send WebTransport datagrams. */ /* Both endpoints can now send WebTransport datagrams. */
Acknowledgments Acknowledgments
The DATAGRAM context identifier was previously part of the DATAGRAM The DATAGRAM context identifier was previously part of the DATAGRAM
frame definition itself, the authors would like to acknowledge the frame definition itself, the authors would like to acknowledge the
 End of changes. 59 change blocks. 
147 lines changed or deleted 420 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/