idnits 2.17.00 (12 Aug 2021) /tmp/idnits30379/draft-ietf-masque-h3-datagram-06.txt: -(623): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == There are 2 instances of lines with non-ascii characters in the document. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document date (4 March 2022) is 78 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: draft-ietf-quic-datagram has been published as RFC 9221 -- Possible downref: Normative reference to a draft: ref. 'H1' -- Possible downref: Normative reference to a draft: ref. 'HTTP' Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 MASQUE D. Schinazi 3 Internet-Draft Google LLC 4 Intended status: Standards Track L. Pardue 5 Expires: 5 September 2022 Cloudflare 6 4 March 2022 8 Using Datagrams with HTTP 9 draft-ietf-masque-h3-datagram-06 11 Abstract 13 The QUIC DATAGRAM extension provides application protocols running 14 over QUIC with a mechanism to send unreliable data while leveraging 15 the security and congestion-control properties of QUIC. However, 16 QUIC DATAGRAM frames do not provide a means to demultiplex 17 application contexts. This document describes how to use QUIC 18 DATAGRAM frames with HTTP/3 by association with HTTP requests. 19 Additionally, this document defines the Capsule Protocol that can 20 convey datagrams over prior versions of HTTP. 22 Discussion Venues 24 This note is to be removed before publishing as an RFC. 26 Discussion of this document takes place on the MASQUE WG mailing list 27 (masque@ietf.org), which is archived at 28 https://mailarchive.ietf.org/arch/browse/masque/. 30 Source for this draft and an issue tracker can be found at 31 https://github.com/ietf-wg-masque/draft-ietf-masque-h3-datagram. 33 Status of This Memo 35 This Internet-Draft is submitted in full conformance with the 36 provisions of BCP 78 and BCP 79. 38 Internet-Drafts are working documents of the Internet Engineering 39 Task Force (IETF). Note that other groups may also distribute 40 working documents as Internet-Drafts. The list of current Internet- 41 Drafts is at https://datatracker.ietf.org/drafts/current/. 43 Internet-Drafts are draft documents valid for a maximum of six months 44 and may be updated, replaced, or obsoleted by other documents at any 45 time. It is inappropriate to use Internet-Drafts as reference 46 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on 5 September 2022. 50 Copyright Notice 52 Copyright (c) 2022 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 57 license-info) in effect on the date of publication of this document. 58 Please review these documents carefully, as they describe your rights 59 and restrictions with respect to this document. Code Components 60 extracted from this document must include Revised BSD License text as 61 described in Section 4.e of the Trust Legal Provisions and are 62 provided without warranty as described in the Revised BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 67 1.1. Conventions and Definitions . . . . . . . . . . . . . . . 3 68 2. Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . 3 69 3. HTTP/3 Datagram Format . . . . . . . . . . . . . . . . . . . 4 70 3.1. The H3_DATAGRAM HTTP/3 SETTINGS Parameter . . . . . . . . 5 71 3.1.1. Note About Draft Versions . . . . . . . . . . . . . . 6 72 4. Capsules . . . . . . . . . . . . . . . . . . . . . . . . . . 6 73 4.1. Capsule Protocol . . . . . . . . . . . . . . . . . . . . 7 74 4.2. Error Handling . . . . . . . . . . . . . . . . . . . . . 8 75 4.3. The Capsule-Protocol Header Field . . . . . . . . . . . . 8 76 4.4. The DATAGRAM Capsule . . . . . . . . . . . . . . . . . . 9 77 5. Prioritization . . . . . . . . . . . . . . . . . . . . . . . 10 78 6. Security Considerations . . . . . . . . . . . . . . . . . . . 11 79 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 80 7.1. HTTP/3 SETTINGS Parameter . . . . . . . . . . . . . . . . 11 81 7.2. HTTP/3 Error Code . . . . . . . . . . . . . . . . . . . . 11 82 7.3. HTTP Header Field Name . . . . . . . . . . . . . . . . . 12 83 7.4. Capsule Types . . . . . . . . . . . . . . . . . . . . . . 12 84 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 85 8.1. Normative References . . . . . . . . . . . . . . . . . . 13 86 8.2. Informative References . . . . . . . . . . . . . . . . . 14 87 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 14 88 A.1. CONNECT-UDP . . . . . . . . . . . . . . . . . . . . . . . 14 89 A.2. WebTransport . . . . . . . . . . . . . . . . . . . . . . 15 90 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 16 91 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 16 93 1. Introduction 95 The QUIC DATAGRAM extension [DGRAM] provides application protocols 96 running over QUIC [QUIC] with a mechanism to send unreliable data 97 while leveraging the security and congestion-control properties of 98 QUIC. However, QUIC DATAGRAM frames do not provide a means to 99 demultiplex application contexts. This document describes how to use 100 QUIC DATAGRAM frames with HTTP/3 [H3] by association with HTTP 101 requests. Additionally, this document defines the Capsule Protocol 102 that can convey datagrams over prior versions of HTTP. 104 This document is structured as follows: 106 * Section 2 presents core concepts for multiplexing across HTTP 107 versions. 109 * Section 3 defines how QUIC DATAGRAM frames are used with HTTP/3. 111 - Section 3.1 defines an HTTP/3 setting that endpoints can use to 112 advertise support of the frame. 114 * Section 4 introduces the Capsule Protocol and the "data stream" 115 concept. Data streams are initiated using special-purpose HTTP 116 requests, after which Capsules, an end-to-end message, can be 117 sent. 119 - Section 4.4 defines Datagram Capsule types, along with guidance 120 for specifying new capsule types. 122 1.1. Conventions and Definitions 124 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 125 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 126 "OPTIONAL" in this document are to be interpreted as described in 127 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 128 capitals, as shown here. 130 2. Multiplexing 132 All HTTP Datagrams are associated with an HTTP request. 134 When running over HTTP/3, multiple exchanges of datagrams need the 135 ability to coexist on a given QUIC connection. To allow this, the 136 QUIC DATAGRAM frame payload starts with an encoded stream identifier 137 that associates the datagram with a request stream. 139 When running over HTTP/2, demultiplexing is provided by the HTTP/2 140 framing layer. When running over HTTP/1, requests are strictly 141 serialized in the connection, therefore demultiplexing is not needed. 143 3. HTTP/3 Datagram Format 145 When used with HTTP/3, the Datagram Data field of QUIC DATAGRAM 146 frames uses the following format (using the notation from the 147 "Notational Conventions" section of [QUIC]): 149 HTTP/3 Datagram { 150 Quarter Stream ID (i), 151 HTTP Datagram Payload (..), 152 } 154 Figure 1: HTTP/3 DATAGRAM Format 156 Quarter Stream ID: A variable-length integer that contains the value 157 of the client-initiated bidirectional stream that this datagram is 158 associated with, divided by four (the division by four stems from 159 the fact that HTTP requests are sent on client-initiated 160 bidirectional streams, and those have stream IDs that are 161 divisible by four). The largest legal QUIC stream ID value is 162 2^62-1, so the largest legal value of Quarter Stream ID is 2^60-1. 163 Receipt of a frame that includes a larger value MUST be treated as 164 an HTTP/3 connection error of type H3_DATAGRAM_ERROR. 166 HTTP Datagram Payload: The payload of the datagram, whose semantics 167 are defined by individual applications. Note that this field can 168 be empty. 170 Receipt of a QUIC DATAGRAM frame whose payload is too short to allow 171 parsing the Quarter Stream ID field MUST be treated as an HTTP/3 172 connection error of type H3_DATAGRAM_ERROR. 174 Endpoints MUST NOT send HTTP/3 datagrams unless the corresponding 175 stream's send side is open. On a given endpoint, once the receive 176 side of a stream is closed, incoming datagrams for this stream are no 177 longer expected so the endpoint can release related state. Endpoints 178 MAY keep state for a short time to account for reordering. Once the 179 state is released, the endpoint MUST silently drop received 180 associated datagrams. 182 If an HTTP/3 datagram is received and its Quarter Stream ID maps to a 183 stream that has not yet been created, the receiver SHALL either drop 184 that datagram silently or buffer it temporarily (on the order of a 185 round trip) while awaiting the creation of the corresponding stream. 187 If an HTTP/3 datagram is received and its Quarter Stream ID maps to a 188 stream that cannot be created due to client-initiated bidirectional 189 stream limits, it SHOULD be treated as an HTTP/3 connection error of 190 type H3_ID_ERROR. Generating an error is not mandatory in this case 191 because HTTP/3 implementations might have practical barriers to 192 determining the active stream concurrency limit that is applied by 193 the QUIC layer. 195 HTTP/3 datagrams MUST only be sent with an association to a stream 196 that supports semantics for HTTP Datagrams. For example, existing 197 HTTP methods GET and POST do not define semantics for associated HTTP 198 Datagrams; therefore, HTTP/3 datagrams cannot be sent associated with 199 GET or POST request streams. If an endpoint receives an HTTP/3 200 datagram associated with a method that has no known semantics for 201 HTTP Datagrams, it MUST abort the corresponding stream with 202 H3_DATAGRAM_ERROR. Future extensions MAY remove these requirements 203 if they define semantics for such HTTP Datagrams and negotiate mutual 204 support. 206 3.1. The H3_DATAGRAM HTTP/3 SETTINGS Parameter 208 Implementations of HTTP/3 that support HTTP Datagrams can indicate 209 that to their peer by sending the H3_DATAGRAM SETTINGS parameter with 210 a value of 1. The value of the H3_DATAGRAM SETTINGS parameter MUST 211 be either 0 or 1. A value of 0 indicates that HTTP Datagrams are not 212 supported. An endpoint that receives the H3_DATAGRAM SETTINGS 213 parameter with a value that is neither 0 or 1 MUST terminate the 214 connection with error H3_SETTINGS_ERROR. 216 Endpoints MUST NOT send QUIC DATAGRAM frames until they have both 217 sent and received the H3_DATAGRAM SETTINGS parameter with a value of 218 1. 220 When clients use 0-RTT, they MAY store the value of the server's 221 H3_DATAGRAM SETTINGS parameter. Doing so allows the client to send 222 QUIC DATAGRAM frames in 0-RTT packets. When servers decide to accept 223 0-RTT data, they MUST send a H3_DATAGRAM SETTINGS parameter greater 224 than or equal to the value they sent to the client in the connection 225 where they sent them the NewSessionTicket message. If a client 226 stores the value of the H3_DATAGRAM SETTINGS parameter with their 227 0-RTT state, they MUST validate that the new value of the H3_DATAGRAM 228 SETTINGS parameter sent by the server in the handshake is greater 229 than or equal to the stored value; if not, the client MUST terminate 230 the connection with error H3_SETTINGS_ERROR. In all cases, the 231 maximum permitted value of the H3_DATAGRAM SETTINGS parameter is 1. 233 It is RECOMMENDED that implementations that support receiving HTTP 234 Datagrams using QUIC always send the H3_DATAGRAM SETTINGS parameter 235 with a value of 1, even if the application does not intend to use 236 HTTP Datagrams. This helps to avoid "sticking out"; see Section 6. 238 3.1.1. Note About Draft Versions 240 [[RFC editor: please remove this section before publication.]] 242 Some revisions of this draft specification use a different value (the 243 Identifier field of a Setting in the HTTP/3 SETTINGS frame) for the 244 H3_DATAGRAM Settings Parameter. This allows new draft revisions to 245 make incompatible changes. Multiple draft versions MAY be supported 246 by either endpoint in a connection. Such endpoints MUST send 247 multiple values for H3_DATAGRAM. Once an endpoint has sent and 248 received SETTINGS, it MUST compute the intersection of the values it 249 has sent and received, and then it MUST select and use the most 250 recent draft version from the intersection set. This ensures that 251 both endpoints negotiate the same draft version. 253 4. Capsules 255 This specification introduces the Capsule Protocol. The Capsule 256 Protocol is a sequence of type-length-value tuples that new HTTP 257 Upgrade Tokens (see Section 16.7 of [HTTP]) can choose to use. It 258 allows endpoints to reliably communicate request-related information 259 end-to-end on HTTP request streams, even in the presence of HTTP 260 intermediaries. The Capsule Protocol can be used to exchange HTTP 261 Datagrams when HTTP is running over a transport that does not support 262 the QUIC DATAGRAM frame. 264 This specification defines the "data stream" of an HTTP request as 265 the bidirectional stream of bytes that follow the headers in both 266 directions. In HTTP/1.x, the data stream consists of all bytes on 267 the connection that follow the blank line that concludes either the 268 request header section, or the 2xx (Successful) response header 269 section. (Note that only a single HTTP request starting the capsule 270 protocol can be sent on HTTP/1.x connections.) In HTTP/2 and HTTP/3, 271 the data stream of a given HTTP request consists of all bytes sent in 272 DATA frames with the corresponding stream ID. The concept of a data 273 stream is particularly relevant for methods such as CONNECT where 274 there is no HTTP message content after the headers. 276 Note that use of the Capsule Protocol is not required to use HTTP 277 Datagrams. If a new HTTP Upgrade Token is only defined over 278 transports that support QUIC DATAGRAM frames, they might not need a 279 stream encoding. Additionally, definitions of new HTTP Upgrade 280 Tokens can use HTTP Datagrams with their own data stream protocol. 282 However, new HTTP Upgrade Tokens that wish to use HTTP Datagrams 283 SHOULD use the Capsule Protocol unless they have a good reason not 284 to. 286 4.1. Capsule Protocol 288 Definitions of new HTTP Upgrade Tokens can state that their data 289 stream uses the Capsule Protocol. If they do so, that means that the 290 contents of their data stream uses the following format (using the 291 notation from the "Notational Conventions" section of [QUIC]): 293 Capsule Protocol { 294 Capsule (..) ..., 295 } 297 Figure 2: Capsule Protocol Stream Format 299 Capsule { 300 Capsule Type (i), 301 Capsule Length (i), 302 Capsule Value (..), 303 } 305 Figure 3: Capsule Format 307 Capsule Type: A variable-length integer indicating the Type of the 308 capsule. Endpoints that receive a capsule with an unknown Capsule 309 Type MUST silently skip over that capsule. 311 Capsule Length: The length of the Capsule Value field following this 312 field, encoded as a variable-length integer. Note that this field 313 can have a value of zero. 315 Capsule Value: The payload of this capsule. Its semantics are 316 determined by the value of the Capsule Type field. 318 Because new protocols or extensions may involve defining new capsule 319 types, intermediaries that wish to allow for future extensibility 320 SHOULD forward capsules unmodified. One exception to this rule is 321 the DATAGRAM capsule; see Section 4.4. An intermediary can identify 322 the use of the capsule protocol either through the presence of the 323 Capsule-Protocol header field (Section 4.3) or by understanding the 324 chosen HTTP Upgrade token. An intermediary that identifies the use 325 of the capsule protocol MAY convert between DATAGRAM capsules and 326 QUIC DATAGRAM frames when forwarding. Definitions of new Capsule 327 Types MAY specify optional custom intermediary processing. 329 Endpoints which receive a Capsule with an unknown Capsule Type MUST 330 silently drop that Capsule. 332 By virtue of the definition of the data stream, the Capsule Protocol 333 is not in use on responses unless the response includes a 2xx 334 (Successful) status code. 336 The Capsule Protocol MUST NOT be used with messages that contain 337 Content-Length, Content-Type, or Transfer-Encoding header fields. 338 Additionally, HTTP status codes 204 (No Content), 205 (Reset 339 Content), and 206 (Partial Content) MUST NOT be sent on responses 340 that use the Capsule Protocol. 342 4.2. Error Handling 344 When an error occurs processing the capsule protocol, the receiver 345 MUST treat the message as malformed or incomplete, according to the 346 underlying transport protocol. For HTTP/3, the handling of malformed 347 messages is described in Section 4.1.3 of [H3]. For HTTP/2, the 348 handling of malformed messages is described in Section 8.1.1 of [H2]. 349 For HTTP/1.1, the handling of incomplete messages is described in 350 Section 8 of [H1]. 352 Each capsule's payload MUST contain exactly the fields identified in 353 its description. A capsule payload that contains additional bytes 354 after the identified fields or a capsule payload that terminates 355 before the end of the identified fields MUST be treated as a 356 malformed or incomplete message. In particular, redundant length 357 encodings MUST be verified to be self-consistent. 359 When a stream carrying capsules terminates cleanly, if the last 360 capsule on the stream was truncated, this MUST be treated as a 361 malformed or incomplete message. 363 4.3. The Capsule-Protocol Header Field 365 This document defines the "Capsule-Protocol" header field. It is an 366 Item Structured Field, see Section 3.3 of [STRUCT-FIELD]; its value 367 MUST be a Boolean. Its ABNF is: 369 Capsule-Protocol = sf-item 370 Endpoints indicate that the Capsule Protocol is in use on the data 371 stream by sending the Capsule-Protocol header field with a value of 372 ?1. A Capsule-Protocol header field with a value of ?0 has the same 373 semantics as when the header is not present. Intermediaries MAY use 374 this header field to allow processing of HTTP Datagrams for unknown 375 HTTP Upgrade Tokens; note that this is only possible for HTTP Upgrade 376 or Extended CONNECT. 378 The Capsule-Protocol header field MUST NOT be sent multiple times on 379 a message. The Capsule-Protocol header field MUST NOT be used on 380 HTTP responses with a status code different from 2xx (Successful). 381 This specification does not define any parameters for the Capsule- 382 Protocol header field value, but future documents MAY define 383 parameters. Receivers MUST ignore unknown parameters. 385 Definitions of new HTTP Upgrade Tokens that use the Capsule Protocol 386 MAY use the Capsule-Protocol header field to simplify intermediary 387 processing. 389 4.4. The DATAGRAM Capsule 391 This document defines the DATAGRAM capsule type (see Section 7.4 for 392 the value of the capsule type). This capsule allows an endpoint to 393 send an HTTP Datagram on a stream using the Capsule Protocol. This 394 is particularly useful when HTTP is running over a transport that 395 does not support the QUIC DATAGRAM frame. 397 Datagram Capsule { 398 Type (i) = DATAGRAM, 399 Length (i), 400 HTTP Datagram Payload (..), 401 } 403 Figure 4: DATAGRAM Capsule Format 405 HTTP Datagram Payload: The payload of the datagram, whose semantics 406 are defined by individual applications. Note that this field can 407 be empty. 409 Datagrams sent using the DATAGRAM capsule have the same semantics as 410 datagrams sent in QUIC DATAGRAM frames. In particular, the 411 restrictions on when it is allowed to send an HTTP Datagram and how 412 to process them from Section 3 also apply to HTTP Datagrams sent and 413 received using the DATAGRAM capsule. 415 An intermediary can reencode HTTP Datagrams as it forwards them. In 416 other words, an intermediary MAY send a DATAGRAM capsule to forward 417 an HTTP Datagram which was received in a QUIC DATAGRAM frame, and 418 vice versa. 420 Note that while DATAGRAM capsules that are sent on a stream are 421 reliably delivered in order, intermediaries can reencode DATAGRAM 422 capsules into QUIC DATAGRAM frames when forwarding messages, which 423 could result in loss or reordering. 425 If an intermediary receives an HTTP Datagram in a QUIC DATAGRAM frame 426 and is forwarding it on a connection that supports QUIC DATAGRAM 427 frames, the intermediary SHOULD NOT convert that HTTP Datagram to a 428 DATAGRAM capsule. If the HTTP Datagram is too large to fit in a 429 DATAGRAM frame (for example because the path MTU of that QUIC 430 connection is too low or if the maximum UDP payload size advertised 431 on that connection is too low), the intermediary SHOULD drop the HTTP 432 Datagram instead of converting it to a DATAGRAM capsule. This 433 preserves the end-to-end unreliability characteristic that methods 434 such as Datagram Packetization Layer Path MTU Discovery (DPLPMTUD) 435 depend on [DPLPMTUD]. An intermediary that converts QUIC DATAGRAM 436 frames to DATAGRAM capsules allows HTTP Datagrams to be arbitrarily 437 large without suffering any loss; this can misrepresent the true path 438 properties, defeating methods such as DPLPMTUD. 440 While DATAGRAM capsules can theoretically carry a payload of length 441 2^62-1, most applications will have their own limits on what datagran 442 payload sizes are practical. Implementations SHOULD take those 443 limits into account when parsing DATAGRAM capsules: if an incoming 444 DATAGRAM capsule has a length that is known to be so large as to not 445 be usable, the implementation SHOULD discard the capsule without 446 buffering its contents into memory. 448 5. Prioritization 450 Data streams (see Section 4.1) can be prioritized using any means 451 suited to stream or request prioritization. For example, see 452 Section 11 of [PRIORITY]. 454 Prioritization of HTTP/3 datagrams is not defined in this document. 455 Future extensions MAY define how to prioritize datagrams, and MAY 456 define signaling to allow endpoints to communicate their 457 prioritization preferences. 459 6. Security Considerations 461 Since transmitting HTTP Datagrams using QUIC DATAGRAM frames requires 462 sending an HTTP/3 Settings parameter, it "sticks out". In other 463 words, probing clients can learn whether a server supports HTTP 464 Datagrams over QUIC DATAGRAM frames. As some servers might wish to 465 obfuscate the fact that they offer application services that use HTTP 466 datagrams, it's best for all implementations that support this 467 feature to always send this Settings parameter, see Section 3.1. 469 Since use of the Capsule Protocol is restricted to new HTTP Upgrade 470 Tokens, it is not accessible from Web Platform APIs (such as those 471 commonly accessed via JavaScript in web browsers). 473 7. IANA Considerations 475 7.1. HTTP/3 SETTINGS Parameter 477 This document will request IANA to register the following entry in 478 the "HTTP/3 Settings" registry: 480 Value: 0xffd277 (note that this will switch to a lower value before 481 publication) 483 Setting Name: H3_DATAGRAM 485 Default: 0 487 Status: provisional (permanent if this document is approved) 489 Specification: This Document 491 Change Controller: IETF 493 Contact: HTTP_WG; HTTP working group; ietf-http-wg@w3.org 495 7.2. HTTP/3 Error Code 497 This document will request IANA to register the following entry in 498 the "HTTP/3 Error Codes" registry: 500 Value: 0x4A1268 (note that this will switch to a lower value before 501 publication) 503 Name: H3_DATAGRAM_ERROR 505 Description: Datagram or capsule protocol parse error 506 Status: provisional (permanent if this document is approved) 508 Specification: This Document 510 Change Controller: IETF 512 Contact: HTTP_WG; HTTP working group; ietf-http-wg@w3.org 514 7.3. HTTP Header Field Name 516 This document will request IANA to register the following entry in 517 the "HTTP Field Name" registry: 519 Field Name: Capsule-Protocol 521 Template: None 523 Status: provisional (permanent if this document is approved) 525 Reference: This document 527 Comments: None 529 7.4. Capsule Types 531 This document establishes a registry for HTTP capsule type codes. 532 The "HTTP Capsule Types" registry governs a 62-bit space. 533 Registrations in this registry MUST include the following fields: 535 Type: A name or label for the capsule type. 537 Value: The value of the Capsule Type field (see Section 4.1) is a 538 62-bit integer. 540 Reference: An optional reference to a specification for the type. 541 This field MAY be empty. 543 Registrations follow the "First Come First Served" policy (see 544 Section 4.4 of [IANA-POLICY]) where two registrations MUST NOT have 545 the same Type. 547 This registry initially contains the following entry: 549 +==============+==========+===============+ 550 | Capsule Type | Value | Specification | 551 +==============+==========+===============+ 552 | DATAGRAM | 0xff37a5 | This Document | 553 +--------------+----------+---------------+ 555 Table 1: Initial Capsule Types Registry 557 Capsule types with a value of the form 41 * N + 23 for integer values 558 of N are reserved to exercise the requirement that unknown capsule 559 types be ignored. These capsules have no semantics and can carry 560 arbitrary values. These values MUST NOT be assigned by IANA and MUST 561 NOT appear in the listing of assigned values. 563 8. References 565 8.1. Normative References 567 [DGRAM] Pauly, T., Kinnear, E., and D. Schinazi, "An Unreliable 568 Datagram Extension to QUIC", Work in Progress, Internet- 569 Draft, draft-ietf-quic-datagram-10, 4 February 2022, 570 . 573 [H1] Fielding, R. T., Nottingham, M., and J. Reschke, 574 "HTTP/1.1", Work in Progress, Internet-Draft, draft-ietf- 575 httpbis-messaging-19, 12 September 2021, 576 . 579 [H2] Thomson, M. and C. Benfield, "HTTP/2", Work in Progress, 580 Internet-Draft, draft-ietf-httpbis-http2bis-07, 24 January 581 2022, . 584 [H3] Bishop, M., "Hypertext Transfer Protocol Version 3 585 (HTTP/3)", Work in Progress, Internet-Draft, draft-ietf- 586 quic-http-34, 2 February 2021, 587 . 590 [HTTP] Fielding, R. T., Nottingham, M., and J. Reschke, "HTTP 591 Semantics", Work in Progress, Internet-Draft, draft-ietf- 592 httpbis-semantics-19, 12 September 2021, 593 . 596 [IANA-POLICY] 597 Cotton, M., Leiba, B., and T. Narten, "Guidelines for 598 Writing an IANA Considerations Section in RFCs", BCP 26, 599 RFC 8126, DOI 10.17487/RFC8126, June 2017, 600 . 602 [QUIC] Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based 603 Multiplexed and Secure Transport", RFC 9000, 604 DOI 10.17487/RFC9000, May 2021, 605 . 607 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 608 Requirement Levels", BCP 14, RFC 2119, 609 DOI 10.17487/RFC2119, March 1997, 610 . 612 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 613 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 614 May 2017, . 616 [STRUCT-FIELD] 617 Nottingham, M. and P-H. Kamp, "Structured Field Values for 618 HTTP", RFC 8941, DOI 10.17487/RFC8941, February 2021, 619 . 621 8.2. Informative References 623 [DPLPMTUD] Fairhurst, G., Jones, T., Tüxen, M., Rüngeler, I., and T. 624 Völker, "Packetization Layer Path MTU Discovery for 625 Datagram Transports", RFC 8899, DOI 10.17487/RFC8899, 626 September 2020, . 628 [PRIORITY] Oku, K. and L. Pardue, "Extensible Prioritization Scheme 629 for HTTP", Work in Progress, Internet-Draft, draft-ietf- 630 httpbis-priority-12, 17 January 2022, 631 . 634 Appendix A. Examples 636 [[RFC editor: please remove this appendix before publication.]] 638 A.1. CONNECT-UDP 639 Client Server 641 STREAM(44): HEADERS --------> 642 :method = CONNECT 643 :protocol = connect-udp 644 :scheme = https 645 :path = /target.example.org/443/ 646 :authority = proxy.example.org:443 647 capsule-protocol = ?1 649 DATAGRAM --------> 650 Quarter Stream ID = 11 651 Payload = Encapsulated UDP Payload 653 <-------- STREAM(44): HEADERS 654 :status = 200 655 capsule-protocol = ?1 657 /* Wait for target server to respond to UDP packet. */ 659 <-------- DATAGRAM 660 Quarter Stream ID = 11 661 Payload = Encapsulated UDP Payload 663 A.2. WebTransport 665 Client Server 667 STREAM(44): HEADERS --------> 668 :method = CONNECT 669 :scheme = https 670 :protocol = webtransport 671 :path = /hello 672 :authority = webtransport.example.org:443 673 origin = https://www.example.org:443 675 <-------- STREAM(44): HEADERS 676 :status = 200 678 /* Both endpoints can now send WebTransport datagrams. */ 680 Acknowledgments 682 Portions of this document were previously part of the QUIC DATAGRAM 683 frame definition itself, the authors would like to acknowledge the 684 authors of that document and the members of the IETF MASQUE working 685 group for their suggestions. Additionally, the authors would like to 686 thank Martin Thomson for suggesting the use of an HTTP/3 SETTINGS 687 parameter. Furthermore, the authors would like to thank Ben Schwartz 688 for writing the first proposal that used two layers of indirection. 689 The final design in this document came out of the HTTP Datagrams 690 Design Team, whose members were Alan Frindell, Alex Chernyakhovsky, 691 Ben Schwartz, Eric Rescorla, Marcus Ihlar, Martin Thomson, Mike 692 Bishop, Tommy Pauly, Victor Vasiliev, and the authors of this 693 document. 695 Authors' Addresses 697 David Schinazi 698 Google LLC 699 1600 Amphitheatre Parkway 700 Mountain View, California 94043, 701 United States of America 702 Email: dschinazi.ietf@gmail.com 704 Lucas Pardue 705 Cloudflare 706 Email: lucaspardue.24.7@gmail.com