idnits 2.17.00 (12 Aug 2021) /tmp/idnits1962/draft-ietf-quic-http-26.txt: 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: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (21 February 2020) is 819 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: A later version (-21) exists of draft-ietf-quic-qpack-13 == Outdated reference: draft-ietf-quic-transport has been published as RFC 9000 -- Duplicate reference: RFC7838, mentioned in 'RFC7838', was also mentioned in 'ALTSVC'. ** Downref: Normative reference to an Historic RFC: RFC 8164 Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 QUIC M. Bishop, Ed. 3 Internet-Draft Akamai 4 Intended status: Standards Track 21 February 2020 5 Expires: 24 August 2020 7 Hypertext Transfer Protocol Version 3 (HTTP/3) 8 draft-ietf-quic-http-26 10 Abstract 12 The QUIC transport protocol has several features that are desirable 13 in a transport for HTTP, such as stream multiplexing, per-stream flow 14 control, and low-latency connection establishment. This document 15 describes a mapping of HTTP semantics over QUIC. This document also 16 identifies HTTP/2 features that are subsumed by QUIC, and describes 17 how HTTP/2 extensions can be ported to HTTP/3. 19 Note to Readers 21 Discussion of this draft takes place on the QUIC working group 22 mailing list (quic@ietf.org), which is archived at 23 https://mailarchive.ietf.org/arch/search/?email_list=quic 24 (https://mailarchive.ietf.org/arch/search/?email_list=quic). 26 Working Group information can be found at https://github.com/quicwg 27 (https://github.com/quicwg); source code and issues list for this 28 draft can be found at https://github.com/quicwg/base-drafts/labels/- 29 http (https://github.com/quicwg/base-drafts/labels/-http). 31 Status of This Memo 33 This Internet-Draft is submitted in full conformance with the 34 provisions of BCP 78 and BCP 79. 36 Internet-Drafts are working documents of the Internet Engineering 37 Task Force (IETF). Note that other groups may also distribute 38 working documents as Internet-Drafts. The list of current Internet- 39 Drafts is at https://datatracker.ietf.org/drafts/current/. 41 Internet-Drafts are draft documents valid for a maximum of six months 42 and may be updated, replaced, or obsoleted by other documents at any 43 time. It is inappropriate to use Internet-Drafts as reference 44 material or to cite them other than as "work in progress." 46 This Internet-Draft will expire on 24 August 2020. 48 Copyright Notice 50 Copyright (c) 2020 IETF Trust and the persons identified as the 51 document authors. All rights reserved. 53 This document is subject to BCP 78 and the IETF Trust's Legal 54 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 55 license-info) in effect on the date of publication of this document. 56 Please review these documents carefully, as they describe your rights 57 and restrictions with respect to this document. Code Components 58 extracted from this document must include Simplified BSD License text 59 as described in Section 4.e of the Trust Legal Provisions and are 60 provided without warranty as described in the Simplified BSD License. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 65 1.1. Prior versions of HTTP . . . . . . . . . . . . . . . . . 4 66 1.2. Delegation to QUIC . . . . . . . . . . . . . . . . . . . 5 67 2. HTTP/3 Protocol Overview . . . . . . . . . . . . . . . . . . 5 68 2.1. Document Organization . . . . . . . . . . . . . . . . . . 6 69 2.2. Conventions and Terminology . . . . . . . . . . . . . . . 7 70 3. Connection Setup and Management . . . . . . . . . . . . . . . 8 71 3.1. Draft Version Identification . . . . . . . . . . . . . . 8 72 3.2. Discovering an HTTP/3 Endpoint . . . . . . . . . . . . . 9 73 3.3. Connection Establishment . . . . . . . . . . . . . . . . 9 74 3.4. Connection Reuse . . . . . . . . . . . . . . . . . . . . 10 75 4. HTTP Request Lifecycle . . . . . . . . . . . . . . . . . . . 10 76 4.1. HTTP Message Exchanges . . . . . . . . . . . . . . . . . 10 77 4.1.1. Header Formatting and Compression . . . . . . . . . . 12 78 4.1.2. Request Cancellation and Rejection . . . . . . . . . 15 79 4.1.3. Malformed Requests and Responses . . . . . . . . . . 16 80 4.2. The CONNECT Method . . . . . . . . . . . . . . . . . . . 17 81 4.3. HTTP Upgrade . . . . . . . . . . . . . . . . . . . . . . 18 82 4.4. Server Push . . . . . . . . . . . . . . . . . . . . . . . 18 83 5. Connection Closure . . . . . . . . . . . . . . . . . . . . . 20 84 5.1. Idle Connections . . . . . . . . . . . . . . . . . . . . 20 85 5.2. Connection Shutdown . . . . . . . . . . . . . . . . . . . 20 86 5.3. Immediate Application Closure . . . . . . . . . . . . . . 22 87 5.4. Transport Closure . . . . . . . . . . . . . . . . . . . . 22 88 6. Stream Mapping and Usage . . . . . . . . . . . . . . . . . . 22 89 6.1. Bidirectional Streams . . . . . . . . . . . . . . . . . . 23 90 6.2. Unidirectional Streams . . . . . . . . . . . . . . . . . 23 91 6.2.1. Control Streams . . . . . . . . . . . . . . . . . . . 24 92 6.2.2. Push Streams . . . . . . . . . . . . . . . . . . . . 25 93 6.2.3. Reserved Stream Types . . . . . . . . . . . . . . . . 26 94 7. HTTP Framing Layer . . . . . . . . . . . . . . . . . . . . . 26 95 7.1. Frame Layout . . . . . . . . . . . . . . . . . . . . . . 27 96 7.2. Frame Definitions . . . . . . . . . . . . . . . . . . . . 28 97 7.2.1. DATA . . . . . . . . . . . . . . . . . . . . . . . . 28 98 7.2.2. HEADERS . . . . . . . . . . . . . . . . . . . . . . . 29 99 7.2.3. CANCEL_PUSH . . . . . . . . . . . . . . . . . . . . . 29 100 7.2.4. SETTINGS . . . . . . . . . . . . . . . . . . . . . . 30 101 7.2.5. PUSH_PROMISE . . . . . . . . . . . . . . . . . . . . 33 102 7.2.6. GOAWAY . . . . . . . . . . . . . . . . . . . . . . . 34 103 7.2.7. MAX_PUSH_ID . . . . . . . . . . . . . . . . . . . . . 35 104 7.2.8. Reserved Frame Types . . . . . . . . . . . . . . . . 36 105 8. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 36 106 8.1. HTTP/3 Error Codes . . . . . . . . . . . . . . . . . . . 36 107 9. Extensions to HTTP/3 . . . . . . . . . . . . . . . . . . . . 38 108 10. Security Considerations . . . . . . . . . . . . . . . . . . . 39 109 10.1. Traffic Analysis . . . . . . . . . . . . . . . . . . . . 39 110 10.2. Frame Parsing . . . . . . . . . . . . . . . . . . . . . 39 111 10.3. Early Data . . . . . . . . . . . . . . . . . . . . . . . 39 112 10.4. Migration . . . . . . . . . . . . . . . . . . . . . . . 39 113 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 40 114 11.1. Registration of HTTP/3 Identification String . . . . . . 40 115 11.2. New Registries . . . . . . . . . . . . . . . . . . . . . 40 116 11.2.1. Frame Types . . . . . . . . . . . . . . . . . . . . 40 117 11.2.2. Settings Parameters . . . . . . . . . . . . . . . . 42 118 11.2.3. Error Codes . . . . . . . . . . . . . . . . . . . . 43 119 11.2.4. Stream Types . . . . . . . . . . . . . . . . . . . . 45 120 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 45 121 12.1. Normative References . . . . . . . . . . . . . . . . . . 45 122 12.2. Informative References . . . . . . . . . . . . . . . . . 47 123 Appendix A. Considerations for Transitioning from HTTP/2 . . . . 48 124 A.1. Streams . . . . . . . . . . . . . . . . . . . . . . . . . 48 125 A.2. HTTP Frame Types . . . . . . . . . . . . . . . . . . . . 49 126 A.2.1. Prioritization Differences . . . . . . . . . . . . . 49 127 A.2.2. Header Compression Differences . . . . . . . . . . . 49 128 A.2.3. Guidance for New Frame Type Definitions . . . . . . . 50 129 A.2.4. Mapping Between HTTP/2 and HTTP/3 Frame Types . . . . 50 130 A.3. HTTP/2 SETTINGS Parameters . . . . . . . . . . . . . . . 51 131 A.4. HTTP/2 Error Codes . . . . . . . . . . . . . . . . . . . 52 132 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 53 133 B.1. Since draft-ietf-quic-http-25 . . . . . . . . . . . . . . 53 134 B.2. Since draft-ietf-quic-http-24 . . . . . . . . . . . . . . 53 135 B.3. Since draft-ietf-quic-http-23 . . . . . . . . . . . . . . 54 136 B.4. Since draft-ietf-quic-http-22 . . . . . . . . . . . . . . 54 137 B.5. Since draft-ietf-quic-http-21 . . . . . . . . . . . . . . 55 138 B.6. Since draft-ietf-quic-http-20 . . . . . . . . . . . . . . 55 139 B.7. Since draft-ietf-quic-http-19 . . . . . . . . . . . . . . 56 140 B.8. Since draft-ietf-quic-http-18 . . . . . . . . . . . . . . 56 141 B.9. Since draft-ietf-quic-http-17 . . . . . . . . . . . . . . 56 142 B.10. Since draft-ietf-quic-http-16 . . . . . . . . . . . . . . 56 143 B.11. Since draft-ietf-quic-http-15 . . . . . . . . . . . . . . 57 144 B.12. Since draft-ietf-quic-http-14 . . . . . . . . . . . . . . 57 145 B.13. Since draft-ietf-quic-http-13 . . . . . . . . . . . . . . 57 146 B.14. Since draft-ietf-quic-http-12 . . . . . . . . . . . . . . 57 147 B.15. Since draft-ietf-quic-http-11 . . . . . . . . . . . . . . 58 148 B.16. Since draft-ietf-quic-http-10 . . . . . . . . . . . . . . 58 149 B.17. Since draft-ietf-quic-http-09 . . . . . . . . . . . . . . 58 150 B.18. Since draft-ietf-quic-http-08 . . . . . . . . . . . . . . 58 151 B.19. Since draft-ietf-quic-http-07 . . . . . . . . . . . . . . 58 152 B.20. Since draft-ietf-quic-http-06 . . . . . . . . . . . . . . 59 153 B.21. Since draft-ietf-quic-http-05 . . . . . . . . . . . . . . 59 154 B.22. Since draft-ietf-quic-http-04 . . . . . . . . . . . . . . 59 155 B.23. Since draft-ietf-quic-http-03 . . . . . . . . . . . . . . 59 156 B.24. Since draft-ietf-quic-http-02 . . . . . . . . . . . . . . 59 157 B.25. Since draft-ietf-quic-http-01 . . . . . . . . . . . . . . 59 158 B.26. Since draft-ietf-quic-http-00 . . . . . . . . . . . . . . 60 159 B.27. Since draft-shade-quic-http2-mapping-00 . . . . . . . . . 60 160 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 60 161 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 61 163 1. Introduction 165 HTTP semantics are used for a broad range of services on the 166 Internet. These semantics have commonly been used with two different 167 TCP mappings, HTTP/1.1 and HTTP/2. HTTP/3 supports the same 168 semantics over a new transport protocol, QUIC. 170 1.1. Prior versions of HTTP 172 HTTP/1.1 is a TCP mapping which uses whitespace-delimited text fields 173 to convey HTTP messages. While these exchanges are human-readable, 174 using whitespace for message formatting leads to parsing difficulties 175 and workarounds to be tolerant of variant behavior. Because each 176 connection can transfer only a single HTTP request or response at a 177 time in each direction, multiple parallel TCP connections are often 178 used, reducing the ability of the congestion controller to accurately 179 manage traffic between endpoints. 181 HTTP/2 introduced a binary framing and multiplexing layer to improve 182 latency without modifying the transport layer. However, because the 183 parallel nature of HTTP/2's multiplexing is not visible to TCP's loss 184 recovery mechanisms, a lost or reordered packet causes all active 185 transactions to experience a stall regardless of whether that 186 transaction was impacted by the lost packet. 188 1.2. Delegation to QUIC 190 The QUIC transport protocol incorporates stream multiplexing and per- 191 stream flow control, similar to that provided by the HTTP/2 framing 192 layer. By providing reliability at the stream level and congestion 193 control across the entire connection, it has the capability to 194 improve the performance of HTTP compared to a TCP mapping. QUIC also 195 incorporates TLS 1.3 at the transport layer, offering comparable 196 security to running TLS over TCP, with the improved connection setup 197 latency of TCP Fast Open [RFC7413]. 199 This document defines a mapping of HTTP semantics over the QUIC 200 transport protocol, drawing heavily on the design of HTTP/2. While 201 delegating stream lifetime and flow control issues to QUIC, a similar 202 binary framing is used on each stream. Some HTTP/2 features are 203 subsumed by QUIC, while other features are implemented atop QUIC. 205 QUIC is described in [QUIC-TRANSPORT]. For a full description of 206 HTTP/2, see [HTTP2]. 208 2. HTTP/3 Protocol Overview 210 HTTP/3 provides a transport for HTTP semantics using the QUIC 211 transport protocol and an internal framing layer similar to HTTP/2. 213 Once a client knows that an HTTP/3 server exists at a certain 214 endpoint, it opens a QUIC connection. QUIC provides protocol 215 negotiation, stream-based multiplexing, and flow control. An HTTP/3 216 endpoint can be discovered using HTTP Alternative Services; this 217 process is described in greater detail in Section 3.2. 219 Within each stream, the basic unit of HTTP/3 communication is a frame 220 (Section 7.2). Each frame type serves a different purpose. For 221 example, HEADERS and DATA frames form the basis of HTTP requests and 222 responses (Section 4.1). 224 Multiplexing of requests is performed using the QUIC stream 225 abstraction, described in Section 2 of [QUIC-TRANSPORT]. Each 226 request-response pair consumes a single QUIC stream. Streams are 227 independent of each other, so one stream that is blocked or suffers 228 packet loss does not prevent progress on other streams. 230 Server push is an interaction mode introduced in HTTP/2 [HTTP2] which 231 permits a server to push a request-response exchange to a client in 232 anticipation of the client making the indicated request. This trades 233 off network usage against a potential latency gain. Several HTTP/3 234 frames are used to manage server push, such as PUSH_PROMISE, 235 MAX_PUSH_ID, and CANCEL_PUSH. 237 As in HTTP/2, request and response headers are compressed for 238 transmission. Because HPACK [HPACK] relies on in-order transmission 239 of compressed header blocks (a guarantee not provided by QUIC), 240 HTTP/3 replaces HPACK with QPACK [QPACK]. QPACK uses separate 241 unidirectional streams to modify and track header table state, while 242 header blocks refer to the state of the table without modifying it. 244 2.1. Document Organization 246 The following sections provide a detailed overview of the connection 247 lifecycle and key concepts: 249 * Connection Setup and Management (Section 3) covers how an HTTP/3 250 endpoint is discovered and a connection is established. 252 * HTTP Request Lifecycle (Section 4) describes how HTTP semantics 253 are expressed using frames. 255 * Connection Closure (Section 5) describes how connections are 256 terminated, either gracefully or abruptly. 258 The details of the wire protocol and interactions with the transport 259 are described in subsequent sections: 261 * Stream Mapping and Usage (Section 6) describes the way QUIC 262 streams are used. 264 * HTTP Framing Layer (Section 7) describes the frames used on most 265 streams. 267 * Error Handling (Section 8) describes how error conditions are 268 handled and expressed, either on a particular stream or for the 269 connection as a whole. 271 Additional resources are provided in the final sections: 273 * Extensions to HTTP/3 (Section 9) describes how new capabilities 274 can be added in future documents. 276 * A more detailed comparison between HTTP/2 and HTTP/3 can be found 277 in Appendix A. 279 2.2. Conventions and Terminology 281 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 282 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 283 "OPTIONAL" in this document are to be interpreted as described in BCP 284 14 [RFC2119] [RFC8174] when, and only when, they appear in all 285 capitals, as shown here. 287 Field definitions are given in Augmented Backus-Naur Form (ABNF), as 288 defined in [RFC5234]. 290 This document uses the variable-length integer encoding from 291 [QUIC-TRANSPORT]. 293 The following terms are used: 295 abort: An abrupt termination of a connection or stream, possibly due 296 to an error condition. 298 client: The endpoint that initiates an HTTP/3 connection. Clients 299 send HTTP requests and receive HTTP responses. 301 connection: A transport-layer connection between two endpoints, 302 using QUIC as the transport protocol. 304 connection error: An error that affects the entire HTTP/3 305 connection. 307 endpoint: Either the client or server of the connection. 309 frame: The smallest unit of communication on a stream in HTTP/3, 310 consisting of a header and a variable-length sequence of bytes 311 structured according to the frame type. Protocol elements called 312 "frames" exist in both this document and [QUIC-TRANSPORT]. Where 313 frames from [QUIC-TRANSPORT] are referenced, the frame name will 314 be prefaced with "QUIC." For example, "QUIC CONNECTION_CLOSE 315 frames." References without this preface refer to frames defined 316 in Section 7.2. 318 peer: An endpoint. When discussing a particular endpoint, "peer" 319 refers to the endpoint that is remote to the primary subject of 320 discussion. 322 receiver: An endpoint that is receiving frames. 324 sender: An endpoint that is transmitting frames. 326 server: The endpoint that accepts an HTTP/3 connection. Servers 327 receive HTTP requests and send HTTP responses. 329 stream: A bidirectional or unidirectional bytestream provided by the 330 QUIC transport. 332 stream error: An error on the individual HTTP/3 stream. 334 The term "payload body" is defined in Section 3.3 of [RFC7230]. 336 Finally, the terms "gateway", "intermediary", "proxy", and "tunnel" 337 are defined in Section 2.3 of [RFC7230]. Intermediaries act as both 338 client and server at different times. 340 3. Connection Setup and Management 342 3.1. Draft Version Identification 344 *RFC Editor's Note:* Please remove this section prior to 345 publication of a final version of this document. 347 HTTP/3 uses the token "h3" to identify itself in ALPN and Alt-Svc. 348 Only implementations of the final, published RFC can identify 349 themselves as "h3". Until such an RFC exists, implementations MUST 350 NOT identify themselves using this string. 352 Implementations of draft versions of the protocol MUST add the string 353 "-" and the corresponding draft number to the identifier. For 354 example, draft-ietf-quic-http-01 is identified using the string 355 "h3-01". 357 Draft versions MUST use the corresponding draft transport version as 358 their transport. For example, the application protocol defined in 359 draft-ietf-quic-http-25 uses the transport defined in draft-ietf- 360 quic-transport-25. 362 Non-compatible experiments that are based on these draft versions 363 MUST append the string "-" and an experiment name to the identifier. 364 For example, an experimental implementation based on draft-ietf-quic- 365 http-09 which reserves an extra stream for unsolicited transmission 366 of 1980s pop music might identify itself as "h3-09-rickroll". Note 367 that any label MUST conform to the "token" syntax defined in 368 Section 3.2.6 of [RFC7230]. Experimenters are encouraged to 369 coordinate their experiments on the quic@ietf.org mailing list. 371 3.2. Discovering an HTTP/3 Endpoint 373 An HTTP origin advertises the availability of an equivalent HTTP/3 374 endpoint via the Alt-Svc HTTP response header field or the HTTP/2 375 ALTSVC frame ([ALTSVC]), using the ALPN token defined in Section 3.3. 377 For example, an origin could indicate in an HTTP response that HTTP/3 378 was available on UDP port 50781 at the same hostname by including the 379 following header field: 381 Alt-Svc: h3=":50781" 383 On receipt of an Alt-Svc record indicating HTTP/3 support, a client 384 MAY attempt to establish a QUIC connection to the indicated host and 385 port and, if successful, send HTTP requests using the mapping 386 described in this document. 388 Connectivity problems (e.g. firewall blocking UDP) can result in QUIC 389 connection establishment failure, in which case the client SHOULD 390 continue using the existing connection or try another alternative 391 endpoint offered by the origin. 393 Servers MAY serve HTTP/3 on any UDP port, since an alternative always 394 includes an explicit port. 396 3.3. Connection Establishment 398 HTTP/3 relies on QUIC version 1 as the underlying transport. The use 399 of other QUIC transport versions with HTTP/3 MAY be defined by future 400 specifications. 402 QUIC version 1 uses TLS version 1.3 or greater as its handshake 403 protocol. HTTP/3 clients MUST support a mechanism to indicate the 404 target host to the server during the TLS handshake. If the server is 405 identified by a DNS name, clients MUST send the Server Name 406 Indication (SNI) [RFC6066] TLS extension unless an alternative 407 mechanism to indicate the target host is used. 409 QUIC connections are established as described in [QUIC-TRANSPORT]. 410 During connection establishment, HTTP/3 support is indicated by 411 selecting the ALPN token "h3" in the TLS handshake. Support for 412 other application-layer protocols MAY be offered in the same 413 handshake. 415 While connection-level options pertaining to the core QUIC protocol 416 are set in the initial crypto handshake, HTTP/3-specific settings are 417 conveyed in the SETTINGS frame. After the QUIC connection is 418 established, a SETTINGS frame (Section 7.2.4) MUST be sent by each 419 endpoint as the initial frame of their respective HTTP control stream 420 (see Section 6.2.1). 422 3.4. Connection Reuse 424 Once a connection exists to a server endpoint, this connection MAY be 425 reused for requests with multiple different URI authority components. 426 The client MAY send any requests for which the client considers the 427 server authoritative. 429 An authoritative HTTP/3 endpoint is typically discovered because the 430 client has received an Alt-Svc record from the request's origin which 431 nominates the endpoint as a valid HTTP Alternative Service for that 432 origin. As required by [RFC7838], clients MUST check that the 433 nominated server can present a valid certificate for the origin 434 before considering it authoritative. Clients MUST NOT assume that an 435 HTTP/3 endpoint is authoritative for other origins without an 436 explicit signal. 438 Prior to making requests for an origin whose scheme is not "https," 439 the client MUST ensure the server is willing to serve that scheme. 440 If the client intends to make requests for an origin whose scheme is 441 "http", this means that it MUST obtain a valid "http-opportunistic" 442 response for the origin as described in [RFC8164] prior to making any 443 such requests. Other schemes might define other mechanisms. 445 A server that does not wish clients to reuse connections for a 446 particular origin can indicate that it is not authoritative for a 447 request by sending a 421 (Misdirected Request) status code in 448 response to the request (see Section 9.1.2 of [HTTP2]). 450 The considerations discussed in Section 9.1 of [HTTP2] also apply to 451 the management of HTTP/3 connections. 453 4. HTTP Request Lifecycle 455 4.1. HTTP Message Exchanges 457 A client sends an HTTP request on a client-initiated bidirectional 458 QUIC stream. A client MUST send only a single request on a given 459 stream. A server sends zero or more non-final HTTP responses on the 460 same stream as the request, followed by a single final HTTP response, 461 as detailed below. 463 Pushed responses are sent on a server-initiated unidirectional QUIC 464 stream (see Section 6.2.2). A server sends zero or more non-final 465 HTTP responses, followed by a single final HTTP response, in the same 466 manner as a standard response. Push is described in more detail in 467 Section 4.4. 469 On a given stream, receipt of multiple requests or receipt of an 470 additional HTTP response following a final HTTP response MUST be 471 treated as malformed (Section 4.1.3). 473 An HTTP message (request or response) consists of: 475 1. the message header (see Section 3.2 of [RFC7230]), sent as a 476 single HEADERS frame (see Section 7.2.2), 478 2. optionally, the payload body, if present (see Section 3.3 of 479 [RFC7230]), sent as a series of DATA frames (see Section 7.2.1), 481 3. optionally, trailing headers, if present (see Section 4.1.2 of 482 [RFC7230]), sent as a single HEADERS frame. 484 Receipt of DATA and HEADERS frames in any other sequence MUST be 485 treated as a connection error of type H3_FRAME_UNEXPECTED 486 (Section 8). 488 A server MAY send one or more PUSH_PROMISE frames (see Section 7.2.5) 489 before, after, or interleaved with the frames of a response message. 490 These PUSH_PROMISE frames are not part of the response; see 491 Section 4.4 for more details. These frames are not permitted in 492 pushed responses; a pushed response which includes PUSH_PROMISE 493 frames MUST be treated as a connection error of type 494 H3_FRAME_UNEXPECTED. 496 Frames of unknown types (Section 9), including reserved frames 497 (Section 7.2.8) MAY be sent on a request or push stream before, 498 after, or interleaved with other frames described in this section. 500 The HEADERS and PUSH_PROMISE frames might reference updates to the 501 QPACK dynamic table. While these updates are not directly part of 502 the message exchange, they must be received and processed before the 503 message can be consumed. See Section 4.1.1 for more details. 505 The "chunked" transfer encoding defined in Section 4.1 of [RFC7230] 506 MUST NOT be used. 508 A response MAY consist of multiple messages when and only when one or 509 more informational responses (1xx; see Section 6.2 of [RFC7231]) 510 precede a final response to the same request. Non-final responses do 511 not contain a payload body or trailers. 513 If an endpoint receives an invalid sequence of frames on either a 514 request or a push stream, it MUST respond with a connection error of 515 type H3_FRAME_UNEXPECTED (Section 8). In particular, a DATA frame 516 before any HEADERS frame, or a HEADERS or DATA frame after the 517 trailing HEADERS frame is considered invalid. 519 An HTTP request/response exchange fully consumes a client-initiated 520 bidirectional QUIC stream. After sending a request, a client MUST 521 close the stream for sending. Unless using the CONNECT method (see 522 Section 4.2), clients MUST NOT make stream closure dependent on 523 receiving a response to their request. After sending a final 524 response, the server MUST close the stream for sending. At this 525 point, the QUIC stream is fully closed. 527 When a stream is closed, this indicates the end of an HTTP message. 528 Because some messages are large or unbounded, endpoints SHOULD begin 529 processing partial HTTP messages once enough of the message has been 530 received to make progress. If a client stream terminates without 531 enough of the HTTP message to provide a complete response, the server 532 SHOULD abort its response with the error code H3_REQUEST_INCOMPLETE. 534 A server can send a complete response prior to the client sending an 535 entire request if the response does not depend on any portion of the 536 request that has not been sent and received. When the server does 537 not need to receive the remainder of the request, it MAY abort 538 reading the request stream, send a complete response, and cleanly 539 close the sending part of the stream. The error code H3_NO_ERROR 540 SHOULD be used when requesting that the client stop sending on the 541 request stream. Clients MUST NOT discard complete responses as a 542 result of having their request terminated abruptly, though clients 543 can always discard responses at their discretion for other reasons. 544 If the server sends a partial or complete response but does not abort 545 reading, clients SHOULD continue sending the body of the request and 546 close the stream normally. 548 4.1.1. Header Formatting and Compression 550 HTTP message headers carry information as a series of key-value 551 pairs, called header fields. For a listing of registered HTTP header 552 fields, see the "Message Header Field" registry maintained at 553 https://www.iana.org/assignments/message-headers 554 (https://www.iana.org/assignments/message-headers). 556 Just as in previous versions of HTTP, header field names are strings 557 of ASCII characters that are compared in a case-insensitive fashion. 558 Properties of HTTP header field names and values are discussed in 559 more detail in Section 3.2 of [RFC7230], though the wire rendering in 560 HTTP/3 differs. As in HTTP/2, header field names MUST be converted 561 to lowercase prior to their encoding. A request or response 562 containing uppercase header field names MUST be treated as malformed 563 (Section 4.1.3). 565 Like HTTP/2, HTTP/3 does not use the Connection header field to 566 indicate connection-specific header fields; in this protocol, 567 connection-specific metadata is conveyed by other means. An endpoint 568 MUST NOT generate an HTTP/3 message containing connection-specific 569 header fields; any message containing connection-specific header 570 fields MUST be treated as malformed (Section 4.1.3). 572 The only exception to this is the TE header field, which MAY be 573 present in an HTTP/3 request; when it is, it MUST NOT contain any 574 value other than "trailers". 576 This means that an intermediary transforming an HTTP/1.x message to 577 HTTP/3 will need to remove any header fields nominated by the 578 Connection header field, along with the Connection header field 579 itself. Such intermediaries SHOULD also remove other connection- 580 specific header fields, such as Keep-Alive, Proxy-Connection, 581 Transfer-Encoding, and Upgrade, even if they are not nominated by the 582 Connection header field. 584 4.1.1.1. Pseudo-Header Fields 586 As in HTTP/2, HTTP/3 uses special pseudo-header fields beginning with 587 the ':' character (ASCII 0x3a) to convey the target URI, the method 588 of the request, and the status code for the response. 590 Pseudo-header fields are not HTTP header fields. Endpoints MUST NOT 591 generate pseudo-header fields other than those defined in this 592 document, except as negotiated via an extension; see Section 9. 594 Pseudo-header fields are only valid in the context in which they are 595 defined. Pseudo-header fields defined for requests MUST NOT appear 596 in responses; pseudo-header fields defined for responses MUST NOT 597 appear in requests. Pseudo-header fields MUST NOT appear in 598 trailers. Endpoints MUST treat a request or response that contains 599 undefined or invalid pseudo-header fields as malformed 600 (Section 4.1.3). 602 All pseudo-header fields MUST appear in the header block before 603 regular header fields. Any request or response that contains a 604 pseudo-header field that appears in a header block after a regular 605 header field MUST be treated as malformed (Section 4.1.3). 607 The following pseudo-header fields are defined for requests: 609 ":method": Contains the HTTP method ([RFC7231], Section 4) 611 ":scheme": Contains the scheme portion of the target URI ([RFC3986], 612 Section 3.1) 614 ":scheme" is not restricted to "http" and "https" schemed URIs. A 615 proxy or gateway can translate requests for non-HTTP schemes, 616 enabling the use of HTTP to interact with non-HTTP services. 618 ":authority": Contains the authority portion of the target URI 619 (Section 3.2 of [RFC3986]). The authority MUST NOT include the 620 deprecated "userinfo" subcomponent for "http" or "https" schemed 621 URIs. 623 To ensure that the HTTP/1.1 request line can be reproduced 624 accurately, this pseudo-header field MUST be omitted when 625 translating from an HTTP/1.1 request that has a request target in 626 origin or asterisk form (see Section 5.3 of [RFC7230]). Clients 627 that generate HTTP/3 requests directly SHOULD use the ":authority" 628 pseudo-header field instead of the Host header field. An 629 intermediary that converts an HTTP/3 request to HTTP/1.1 MUST 630 create a Host header field if one is not present in a request by 631 copying the value of the ":authority" pseudo-header field. 633 ":path": Contains the path and query parts of the target URI (the 634 "path-absolute" production and optionally a '?' character followed 635 by the "query" production (see Sections 3.3 and 3.4 of [RFC3986]). 636 A request in asterisk form includes the value '*' for the ":path" 637 pseudo-header field. 639 This pseudo-header field MUST NOT be empty for "http" or "https" 640 URIs; "http" or "https" URIs that do not contain a path component 641 MUST include a value of '/'. The exception to this rule is an 642 OPTIONS request for an "http" or "https" URI that does not include 643 a path component; these MUST include a ":path" pseudo-header field 644 with a value of '*' (see Section 5.3.4 of [RFC7230]). 646 All HTTP/3 requests MUST include exactly one value for the ":method", 647 ":scheme", and ":path" pseudo-header fields, unless it is a CONNECT 648 request (Section 4.2). An HTTP request that omits mandatory pseudo- 649 header fields or contains invalid values for those fields is 650 malformed (Section 4.1.3). 652 HTTP/3 does not define a way to carry the version identifier that is 653 included in the HTTP/1.1 request line. 655 For responses, a single ":status" pseudo-header field is defined that 656 carries the HTTP status code field (see Section 6 of [RFC7231]). 658 This pseudo-header field MUST be included in all responses; 659 otherwise, the response is malformed (Section 4.1.3). 661 HTTP/3 does not define a way to carry the version or reason phrase 662 that is included in an HTTP/1.1 status line. 664 4.1.1.2. Header Compression 666 HTTP/3 uses QPACK header compression as described in [QPACK], a 667 variation of HPACK which allows the flexibility to avoid header- 668 compression-induced head-of-line blocking. See that document for 669 additional details. 671 To allow for better compression efficiency, the cookie header field 672 [RFC6265] MAY be split into separate header fields, each with one or 673 more cookie-pairs, before compression. If a decompressed header list 674 contains multiple cookie header fields, these MUST be concatenated 675 before being passed into a non-HTTP/2, non-HTTP/3 context, as 676 described in Section 8.1.2.5 of [HTTP2]. 678 4.1.1.3. Header Size Constraints 680 An HTTP/3 implementation MAY impose a limit on the maximum size of 681 the message header it will accept on an individual HTTP message. A 682 server that receives a larger header field list than it is willing to 683 handle can send an HTTP 431 (Request Header Fields Too Large) status 684 code [RFC6585]. A client can discard responses that it cannot 685 process. The size of a header field list is calculated based on the 686 uncompressed size of header fields, including the length of the name 687 and value in bytes plus an overhead of 32 bytes for each header 688 field. 690 If an implementation wishes to advise its peer of this limit, it can 691 be conveyed as a number of bytes in the 692 "SETTINGS_MAX_HEADER_LIST_SIZE" parameter. An implementation which 693 has received this parameter SHOULD NOT send an HTTP message header 694 which exceeds the indicated size, as the peer will likely refuse to 695 process it. However, because this limit is applied at each hop, 696 messages below this limit are not guaranteed to be accepted. 698 4.1.2. Request Cancellation and Rejection 700 Clients can cancel requests by resetting and aborting the request 701 stream with an error code of H3_REQUEST_CANCELLED (Section 8.1). 702 When the client aborts reading a response, it indicates that this 703 response is no longer of interest. Implementations SHOULD cancel 704 requests by abruptly terminating any directions of a stream that are 705 still open. 707 When the server rejects a request without performing any application 708 processing, it SHOULD abort its response stream with the error code 709 H3_REQUEST_REJECTED. In this context, "processed" means that some 710 data from the stream was passed to some higher layer of software that 711 might have taken some action as a result. The client can treat 712 requests rejected by the server as though they had never been sent at 713 all, thereby allowing them to be retried later on a new connection. 714 Servers MUST NOT use the H3_REQUEST_REJECTED error code for requests 715 which were partially or fully processed. When a server abandons a 716 response after partial processing, it SHOULD abort its response 717 stream with the error code H3_REQUEST_CANCELLED. 719 When a client resets a request with the error code 720 H3_REQUEST_CANCELLED, a server MAY abruptly terminate the response 721 using the error code H3_REQUEST_REJECTED if no processing was 722 performed. Clients MUST NOT use the H3_REQUEST_REJECTED error code, 723 except when a server has requested closure of the request stream with 724 this error code. 726 If a stream is cancelled after receiving a complete response, the 727 client MAY ignore the cancellation and use the response. However, if 728 a stream is cancelled after receiving a partial response, the 729 response SHOULD NOT be used. Automatically retrying such requests is 730 not possible, unless this is otherwise permitted (e.g., idempotent 731 actions like GET, PUT, or DELETE). 733 4.1.3. Malformed Requests and Responses 735 A malformed request or response is one that is an otherwise valid 736 sequence of frames but is invalid due to: 738 * the presence of prohibited header fields or pseudo-header fields, 740 * the absence of mandatory pseudo-header fields, 742 * invalid values for pseudo-header fields, 744 * pseudo-header fields after header fields, 746 * an invalid sequence of HTTP messages, or 748 * the inclusion of uppercase header field names. 750 A request or response that includes a payload body can include a 751 "content-length" header field. A request or response is also 752 malformed if the value of a content-length header field does not 753 equal the sum of the DATA frame payload lengths that form the body. 754 A response that is defined to have no payload, as described in 755 Section 3.3.2 of [RFC7230] can have a non-zero content-length header 756 field, even though no content is included in DATA frames. 758 Intermediaries that process HTTP requests or responses (i.e., any 759 intermediary not acting as a tunnel) MUST NOT forward a malformed 760 request or response. Malformed requests or responses that are 761 detected MUST be treated as a stream error (Section 8) of type 762 H3_GENERAL_PROTOCOL_ERROR. 764 For malformed requests, a server MAY send an HTTP response prior to 765 closing or resetting the stream. Clients MUST NOT accept a malformed 766 response. Note that these requirements are intended to protect 767 against several types of common attacks against HTTP; they are 768 deliberately strict because being permissive can expose 769 implementations to these vulnerabilities. 771 4.2. The CONNECT Method 773 The pseudo-method CONNECT (Section 4.3.6 of [RFC7231]) is primarily 774 used with HTTP proxies to establish a TLS session with an origin 775 server for the purposes of interacting with "https" resources. In 776 HTTP/1.x, CONNECT is used to convert an entire HTTP connection into a 777 tunnel to a remote host. In HTTP/2, the CONNECT method is used to 778 establish a tunnel over a single HTTP/2 stream to a remote host for 779 similar purposes. 781 A CONNECT request in HTTP/3 functions in the same manner as in 782 HTTP/2. The request MUST be formatted as described in Section 8.3 of 783 [HTTP2]. A CONNECT request that does not conform to these 784 restrictions is malformed (see Section 4.1.3). The request stream 785 MUST NOT be closed at the end of the request. 787 A proxy that supports CONNECT establishes a TCP connection 788 ([RFC0793]) to the server identified in the ":authority" pseudo- 789 header field. Once this connection is successfully established, the 790 proxy sends a HEADERS frame containing a 2xx series status code to 791 the client, as defined in Section 4.3.6 of [RFC7231]. 793 All DATA frames on the stream correspond to data sent or received on 794 the TCP connection. Any DATA frame sent by the client is transmitted 795 by the proxy to the TCP server; data received from the TCP server is 796 packaged into DATA frames by the proxy. Note that the size and 797 number of TCP segments is not guaranteed to map predictably to the 798 size and number of HTTP DATA or QUIC STREAM frames. 800 Once the CONNECT method has completed, only DATA frames are permitted 801 to be sent on the stream. Extension frames MAY be used if 802 specifically permitted by the definition of the extension. Receipt 803 of any other frame type MUST be treated as a connection error of type 804 H3_FRAME_UNEXPECTED. 806 The TCP connection can be closed by either peer. When the client 807 ends the request stream (that is, the receive stream at the proxy 808 enters the "Data Recvd" state), the proxy will set the FIN bit on its 809 connection to the TCP server. When the proxy receives a packet with 810 the FIN bit set, it will terminate the send stream that it sends to 811 the client. TCP connections which remain half-closed in a single 812 direction are not invalid, but are often handled poorly by servers, 813 so clients SHOULD NOT close a stream for sending while they still 814 expect to receive data from the target of the CONNECT. 816 A TCP connection error is signaled by abruptly terminating the 817 stream. A proxy treats any error in the TCP connection, which 818 includes receiving a TCP segment with the RST bit set, as a stream 819 error of type H3_CONNECT_ERROR (Section 8.1). Correspondingly, if a 820 proxy detects an error with the stream or the QUIC connection, it 821 MUST close the TCP connection. If the underlying TCP implementation 822 permits it, the proxy SHOULD send a TCP segment with the RST bit set. 824 4.3. HTTP Upgrade 826 HTTP/3 does not support the HTTP Upgrade mechanism (Section 6.7 of 827 [RFC7230]) or 101 (Switching Protocols) informational status code 828 (Section 6.2.2 of [RFC7231]). 830 4.4. Server Push 832 Server push is an interaction mode introduced in HTTP/2 [HTTP2] which 833 permits a server to push a request-response exchange to a client in 834 anticipation of the client making the indicated request. This trades 835 off network usage against a potential latency gain. HTTP/3 server 836 push is similar to what is described in HTTP/2 [HTTP2], but uses 837 different mechanisms. 839 Each server push is identified by a unique Push ID. This Push ID is 840 used in one or more PUSH_PROMISE frames (see Section 7.2.5) that 841 carry the request headers, then included with the push stream which 842 ultimately fulfills those promises. When the same Push ID is 843 promised on multiple request streams, the decompressed request header 844 sets MUST contain the same fields in the same order, and both the 845 name and the value in each field MUST be exact matches. 847 Server push is only enabled on a connection when a client sends a 848 MAX_PUSH_ID frame (see Section 7.2.7). A server cannot use server 849 push until it receives a MAX_PUSH_ID frame. A client sends 850 additional MAX_PUSH_ID frames to control the number of pushes that a 851 server can promise. A server SHOULD use Push IDs sequentially, 852 starting at 0. A client MUST treat receipt of a push stream with a 853 Push ID that is greater than the maximum Push ID as a connection 854 error of type H3_ID_ERROR. 856 The header of the request message is carried by a PUSH_PROMISE frame 857 (see Section 7.2.5) on the request stream which generated the push. 858 Promised requests MUST conform to the requirements in Section 8.2 of 859 [HTTP2]. 861 Each pushed response is associated with one or more client requests. 862 The push is associated with the request stream on which the 863 PUSH_PROMISE frame was received. The same server push can be 864 associated with additional client requests using a PUSH_PROMISE frame 865 with the same Push ID on multiple request streams. These 866 associations do not affect the operation of the protocol, but MAY be 867 considered by user agents when deciding how to use pushed resources. 869 Ordering of a PUSH_PROMISE in relation to certain parts of the 870 response is important. The server SHOULD send PUSH_PROMISE frames 871 prior to sending HEADERS or DATA frames that reference the promised 872 responses. This reduces the chance that a client requests a resource 873 that will be pushed by the server. 875 When a server later fulfills a promise, the server push response is 876 conveyed on a push stream (see Section 6.2.2). The push stream 877 identifies the Push ID of the promise that it fulfills, then contains 878 a response to the promised request using the same format described 879 for responses in Section 4.1. 881 Due to reordering, push stream data can arrive before the 882 corresponding PUSH_PROMISE frame. When a client receives a new push 883 stream with an as-yet-unknown Push ID, both the associated client 884 request and the pushed request headers are unknown. The client can 885 buffer the stream data in expectation of the matching PUSH_PROMISE. 886 The client can use stream flow control (see section 4.1 of 887 [QUIC-TRANSPORT]) to limit the amount of data a server may commit to 888 the pushed stream. 890 If a promised server push is not needed by the client, the client 891 SHOULD send a CANCEL_PUSH frame. If the push stream is already open 892 or opens after sending the CANCEL_PUSH frame, the client can abort 893 reading the stream with an error code of H3_REQUEST_CANCELLED. This 894 asks the server not to transfer additional data and indicates that it 895 will be discarded upon receipt. 897 5. Connection Closure 899 Once established, an HTTP/3 connection can be used for many requests 900 and responses over time until the connection is closed. Connection 901 closure can happen in any of several different ways. 903 5.1. Idle Connections 905 Each QUIC endpoint declares an idle timeout during the handshake. If 906 the connection remains idle (no packets received) for longer than 907 this duration, the peer will assume that the connection has been 908 closed. HTTP/3 implementations will need to open a new connection 909 for new requests if the existing connection has been idle for longer 910 than the server's advertised idle timeout, and SHOULD do so if 911 approaching the idle timeout. 913 HTTP clients are expected to request that the transport keep 914 connections open while there are responses outstanding for requests 915 or server pushes, as described in Section 19.2 of [QUIC-TRANSPORT]. 916 If the client is not expecting a response from the server, allowing 917 an idle connection to time out is preferred over expending effort 918 maintaining a connection that might not be needed. A gateway MAY 919 maintain connections in anticipation of need rather than incur the 920 latency cost of connection establishment to servers. Servers SHOULD 921 NOT actively keep connections open. 923 5.2. Connection Shutdown 925 Even when a connection is not idle, either endpoint can decide to 926 stop using the connection and let the connection close gracefully. 927 Since clients drive request generation, clients perform a connection 928 shutdown by not sending additional requests on the connection; 929 responses and pushed responses associated to previous requests will 930 continue to completion. Servers perform the same function by 931 communicating with clients. 933 Servers initiate the shutdown of a connection by sending a GOAWAY 934 frame (Section 7.2.6). The GOAWAY frame indicates that client- 935 initiated requests on lower stream IDs were or might be processed in 936 this connection, while requests on the indicated stream ID and 937 greater were rejected. This enables client and server to agree on 938 which requests were accepted prior to the connection shutdown. This 939 identifier MAY be zero if no requests were processed. Servers SHOULD 940 NOT permit additional QUIC streams after sending a GOAWAY frame. 942 Clients MUST NOT send new requests on the connection after receiving 943 GOAWAY; a new connection MAY be established to send additional 944 requests. 946 Some requests might already be in transit. If the client has already 947 sent requests on streams with a Stream ID greater than or equal to 948 that indicated in the GOAWAY frame, those requests will not be 949 processed and MAY be retried by the client on a different connection. 950 The client MAY cancel these requests. It is RECOMMENDED that the 951 server explicitly reject such requests (see Section 4.1.2) in order 952 to clean up transport state for the affected streams. 954 Requests on Stream IDs less than the Stream ID in the GOAWAY frame 955 might have been processed; their status cannot be known until a 956 response is received, the stream is reset individually, or the 957 connection terminates. Servers MAY reject individual requests on 958 streams below the indicated ID if these requests were not processed. 960 Servers SHOULD send a GOAWAY frame when the closing of a connection 961 is known in advance, even if the advance notice is small, so that the 962 remote peer can know whether a request has been partially processed 963 or not. For example, if an HTTP client sends a POST at the same time 964 that a server closes a QUIC connection, the client cannot know if the 965 server started to process that POST request if the server does not 966 send a GOAWAY frame to indicate what streams it might have acted on. 968 A client that is unable to retry requests loses all requests that are 969 in flight when the server closes the connection. A server MAY send 970 multiple GOAWAY frames indicating different stream IDs, but MUST NOT 971 increase the value they send in the last Stream ID, since clients 972 might already have retried unprocessed requests on another 973 connection. 975 A server that is attempting to gracefully shut down a connection can 976 send an initial GOAWAY frame with the last Stream ID set to the 977 maximum possible value for a client-initiated, bidirectional stream 978 (i.e. 2^62-4 in case of QUIC version 1). This GOAWAY frame signals 979 to the client that shutdown is imminent and that initiating further 980 requests is prohibited. After allowing time for any in-flight 981 requests to reach the server, the server can send another GOAWAY 982 frame indicating which requests it will accept before the end of the 983 connection. This ensures that a connection can be cleanly shut down 984 without causing requests to fail. 986 Once all accepted requests have been processed, the server can permit 987 the connection to become idle, or MAY initiate an immediate closure 988 of the connection. An endpoint that completes a graceful shutdown 989 SHOULD use the H3_NO_ERROR code when closing the connection. 991 If a client has consumed all available bidirectional stream IDs with 992 requests, the server need not send a GOAWAY frame, since the client 993 is unable to make further requests. 995 5.3. Immediate Application Closure 997 An HTTP/3 implementation can immediately close the QUIC connection at 998 any time. This results in sending a QUIC CONNECTION_CLOSE frame to 999 the peer; the error code in this frame indicates to the peer why the 1000 connection is being closed. See Section 8 for error codes which can 1001 be used when closing a connection. 1003 Before closing the connection, a GOAWAY MAY be sent to allow the 1004 client to retry some requests. Including the GOAWAY frame in the 1005 same packet as the QUIC CONNECTION_CLOSE frame improves the chances 1006 of the frame being received by clients. 1008 5.4. Transport Closure 1010 For various reasons, the QUIC transport could indicate to the 1011 application layer that the connection has terminated. This might be 1012 due to an explicit closure by the peer, a transport-level error, or a 1013 change in network topology which interrupts connectivity. 1015 If a connection terminates without a GOAWAY frame, clients MUST 1016 assume that any request which was sent, whether in whole or in part, 1017 might have been processed. 1019 6. Stream Mapping and Usage 1021 A QUIC stream provides reliable in-order delivery of bytes, but makes 1022 no guarantees about order of delivery with regard to bytes on other 1023 streams. On the wire, data is framed into QUIC STREAM frames, but 1024 this framing is invisible to the HTTP framing layer. The transport 1025 layer buffers and orders received QUIC STREAM frames, exposing the 1026 data contained within as a reliable byte stream to the application. 1027 Although QUIC permits out-of-order delivery within a stream, HTTP/3 1028 does not make use of this feature. 1030 QUIC streams can be either unidirectional, carrying data only from 1031 initiator to receiver, or bidirectional. Streams can be initiated by 1032 either the client or the server. For more detail on QUIC streams, 1033 see Section 2 of [QUIC-TRANSPORT]. 1035 When HTTP headers and data are sent over QUIC, the QUIC layer handles 1036 most of the stream management. HTTP does not need to do any separate 1037 multiplexing when using QUIC - data sent over a QUIC stream always 1038 maps to a particular HTTP transaction or connection context. 1040 6.1. Bidirectional Streams 1042 All client-initiated bidirectional streams are used for HTTP requests 1043 and responses. A bidirectional stream ensures that the response can 1044 be readily correlated with the request. This means that the client's 1045 first request occurs on QUIC stream 0, with subsequent requests on 1046 stream 4, 8, and so on. In order to permit these streams to open, an 1047 HTTP/3 server SHOULD configure non-zero minimum values for the number 1048 of permitted streams and the initial stream flow control window. So 1049 as to not unnecessarily limit parallelism, at least 100 requests 1050 SHOULD be permitted at a time. 1052 HTTP/3 does not use server-initiated bidirectional streams, though an 1053 extension could define a use for these streams. Clients MUST treat 1054 receipt of a server-initiated bidirectional stream as a connection 1055 error of type H3_STREAM_CREATION_ERROR unless such an extension has 1056 been negotiated. 1058 6.2. Unidirectional Streams 1060 Unidirectional streams, in either direction, are used for a range of 1061 purposes. The purpose is indicated by a stream type, which is sent 1062 as a variable-length integer at the start of the stream. The format 1063 and structure of data that follows this integer is determined by the 1064 stream type. 1066 0 1 2 3 1067 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1068 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1069 | Stream Type (i) ... 1070 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1072 Figure 1: Unidirectional Stream Header 1074 Some stream types are reserved (Section 6.2.3). Two stream types are 1075 defined in this document: control streams (Section 6.2.1) and push 1076 streams (Section 6.2.2). [QPACK] defines two additional stream 1077 types. Other stream types can be defined by extensions to HTTP/3; 1078 see Section 9 for more details. 1080 The performance of HTTP/3 connections in the early phase of their 1081 lifetime is sensitive to the creation and exchange of data on 1082 unidirectional streams. Endpoints that excessively restrict the 1083 number of streams or the flow control window of these streams will 1084 increase the chance that the remote peer reaches the limit early and 1085 becomes blocked. In particular, implementations should consider that 1086 remote peers may wish to exercise reserved stream behavior 1087 (Section 6.2.3) with some of the unidirectional streams they are 1088 permitted to use. To avoid blocking, the transport parameters sent 1089 by both clients and servers MUST allow the peer to create at least 1090 one unidirectional stream for the HTTP control stream plus the number 1091 of unidirectional streams required by mandatory extensions (three 1092 being the minimum number required for the base HTTP/3 protocol and 1093 QPACK), and SHOULD provide at least 1,024 bytes of flow control 1094 credit to each stream. 1096 Note that an endpoint is not required to grant additional credits to 1097 create more unidirectional streams if its peer consumes all the 1098 initial credits before creating the critical unidirectional streams. 1099 Endpoints SHOULD create the HTTP control stream as well as the 1100 unidirectional streams required by mandatory extensions (such as the 1101 QPACK encoder and decoder streams) first, and then create additional 1102 streams as allowed by their peer. 1104 If the stream header indicates a stream type which is not supported 1105 by the recipient, the remainder of the stream cannot be consumed as 1106 the semantics are unknown. Recipients of unknown stream types MAY 1107 abort reading of the stream with an error code of 1108 H3_STREAM_CREATION_ERROR, but MUST NOT consider such streams to be a 1109 connection error of any kind. 1111 Implementations MAY send stream types before knowing whether the peer 1112 supports them. However, stream types which could modify the state or 1113 semantics of existing protocol components, including QPACK or other 1114 extensions, MUST NOT be sent until the peer is known to support them. 1116 A sender can close or reset a unidirectional stream unless otherwise 1117 specified. A receiver MUST tolerate unidirectional streams being 1118 closed or reset prior to the reception of the unidirectional stream 1119 header. 1121 6.2.1. Control Streams 1123 A control stream is indicated by a stream type of "0x00". Data on 1124 this stream consists of HTTP/3 frames, as defined in Section 7.2. 1126 Each side MUST initiate a single control stream at the beginning of 1127 the connection and send its SETTINGS frame as the first frame on this 1128 stream. If the first frame of the control stream is any other frame 1129 type, this MUST be treated as a connection error of type 1130 H3_MISSING_SETTINGS. Only one control stream per peer is permitted; 1131 receipt of a second stream which claims to be a control stream MUST 1132 be treated as a connection error of type H3_STREAM_CREATION_ERROR. 1133 The sender MUST NOT close the control stream, and the receiver MUST 1134 NOT request that the sender close the control stream. If either 1135 control stream is closed at any point, this MUST be treated as a 1136 connection error of type H3_CLOSED_CRITICAL_STREAM. 1138 A pair of unidirectional streams is used rather than a single 1139 bidirectional stream. This allows either peer to send data as soon 1140 as it is able. Depending on whether 0-RTT is enabled on the 1141 connection, either client or server might be able to send stream data 1142 first after the cryptographic handshake completes. 1144 6.2.2. Push Streams 1146 Server push is an optional feature introduced in HTTP/2 that allows a 1147 server to initiate a response before a request has been made. See 1148 Section 4.4 for more details. 1150 A push stream is indicated by a stream type of "0x01", followed by 1151 the Push ID of the promise that it fulfills, encoded as a variable- 1152 length integer. The remaining data on this stream consists of HTTP/3 1153 frames, as defined in Section 7.2, and fulfills a promised server 1154 push by zero or more non-final HTTP responses followed by a single 1155 final HTTP response, as defined in Section 4.1. Server push and Push 1156 IDs are described in Section 4.4. 1158 Only servers can push; if a server receives a client-initiated push 1159 stream, this MUST be treated as a connection error of type 1160 H3_STREAM_CREATION_ERROR. 1162 0 1 2 3 1163 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1164 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1165 | 0x01 (i) ... 1166 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1167 | Push ID (i) ... 1168 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1170 Figure 2: Push Stream Header 1172 Each Push ID MUST only be used once in a push stream header. If a 1173 push stream header includes a Push ID that was used in another push 1174 stream header, the client MUST treat this as a connection error of 1175 type H3_ID_ERROR. 1177 6.2.3. Reserved Stream Types 1179 Stream types of the format "0x1f * N + 0x21" for integer values of N 1180 are reserved to exercise the requirement that unknown types be 1181 ignored. These streams have no semantics, and can be sent when 1182 application-layer padding is desired. They MAY also be sent on 1183 connections where no data is currently being transferred. Endpoints 1184 MUST NOT consider these streams to have any meaning upon receipt. 1186 The payload and length of the stream are selected in any manner the 1187 implementation chooses. Implementations MAY terminate these streams 1188 cleanly, or MAY abruptly terminate them. When terminating abruptly, 1189 the error code H3_NO_ERROR or a reserved error code (Section 8.1) 1190 SHOULD be used. 1192 7. HTTP Framing Layer 1194 HTTP frames are carried on QUIC streams, as described in Section 6. 1195 HTTP/3 defines three stream types: control stream, request stream, 1196 and push stream. This section describes HTTP/3 frame formats and the 1197 streams types on which they are permitted; see Table 1 for an 1198 overview. A comparison between HTTP/2 and HTTP/3 frames is provided 1199 in Appendix A.2. 1201 +--------------+----------------+----------------+--------+---------+ 1202 | Frame | Control Stream | Request | Push | Section | 1203 | | | Stream | Stream | | 1204 +==============+================+================+========+=========+ 1205 | DATA | No | Yes | Yes | Section | 1206 | | | | | 7.2.1 | 1207 +--------------+----------------+----------------+--------+---------+ 1208 | HEADERS | No | Yes | Yes | Section | 1209 | | | | | 7.2.2 | 1210 +--------------+----------------+----------------+--------+---------+ 1211 | CANCEL_PUSH | Yes | No | No | Section | 1212 | | | | | 7.2.3 | 1213 +--------------+----------------+----------------+--------+---------+ 1214 | SETTINGS | Yes (1) | No | No | Section | 1215 | | | | | 7.2.4 | 1216 +--------------+----------------+----------------+--------+---------+ 1217 | PUSH_PROMISE | No | Yes | No | Section | 1218 | | | | | 7.2.5 | 1219 +--------------+----------------+----------------+--------+---------+ 1220 | GOAWAY | Yes | No | No | Section | 1221 | | | | | 7.2.6 | 1222 +--------------+----------------+----------------+--------+---------+ 1223 | MAX_PUSH_ID | Yes | No | No | Section | 1224 | | | | | 7.2.7 | 1225 +--------------+----------------+----------------+--------+---------+ 1226 | Reserved | Yes | Yes | Yes | Section | 1227 | | | | | 7.2.8 | 1228 +--------------+----------------+----------------+--------+---------+ 1230 Table 1: HTTP/3 Frames and Stream Type Overview 1232 Certain frames can only occur as the first frame of a particular 1233 stream type; these are indicated in Table 1 with a (1). Specific 1234 guidance is provided in the relevant section. 1236 Note that, unlike QUIC frames, HTTP/3 frames can span multiple 1237 packets. 1239 7.1. Frame Layout 1241 All frames have the following format: 1243 0 1 2 3 1244 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1245 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1246 | Type (i) ... 1247 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1248 | Length (i) ... 1249 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1250 | Frame Payload (*) ... 1251 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1253 Figure 3: HTTP/3 Frame Format 1255 A frame includes the following fields: 1257 Type: A variable-length integer that identifies the frame type. 1259 Length: A variable-length integer that describes the length in bytes 1260 of the Frame Payload. 1262 Frame Payload: A payload, the semantics of which are determined by 1263 the Type field. 1265 Each frame's payload MUST contain exactly the fields identified in 1266 its description. A frame payload that contains additional bytes 1267 after the identified fields or a frame payload that terminates before 1268 the end of the identified fields MUST be treated as a connection 1269 error of type H3_FRAME_ERROR. 1271 When a stream terminates cleanly, if the last frame on the stream was 1272 truncated, this MUST be treated as a connection error (Section 8) of 1273 type H3_FRAME_ERROR. Streams which terminate abruptly may be reset 1274 at any point in a frame. 1276 7.2. Frame Definitions 1278 7.2.1. DATA 1280 DATA frames (type=0x0) convey arbitrary, variable-length sequences of 1281 bytes associated with an HTTP request or response payload. 1283 DATA frames MUST be associated with an HTTP request or response. If 1284 a DATA frame is received on a control stream, the recipient MUST 1285 respond with a connection error (Section 8) of type 1286 H3_FRAME_UNEXPECTED. 1288 0 1 2 3 1289 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1290 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1291 | Payload (*) ... 1292 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1294 Figure 4: DATA Frame Payload 1296 7.2.2. HEADERS 1298 The HEADERS frame (type=0x1) is used to carry a header block, 1299 compressed using QPACK. See [QPACK] for more details. 1301 0 1 2 3 1302 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1303 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1304 | Header Block (*) ... 1305 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1307 Figure 5: HEADERS Frame Payload 1309 HEADERS frames can only be sent on request / push streams. If a 1310 HEADERS frame is received on a control stream, the recipient MUST 1311 respond with a connection error (Section 8) of type 1312 H3_FRAME_UNEXPECTED. 1314 7.2.3. CANCEL_PUSH 1316 The CANCEL_PUSH frame (type=0x3) is used to request cancellation of a 1317 server push prior to the push stream being received. The CANCEL_PUSH 1318 frame identifies a server push by Push ID (see Section 7.2.5), 1319 encoded as a variable-length integer. 1321 When a client sends CANCEL_PUSH, it is indicating that it does not 1322 wish to receive the promised resource. The server SHOULD abort 1323 sending the resource, but the mechanism to do so depends on the state 1324 of the corresponding push stream. If the server has not yet created 1325 a push stream, it does not create one. If the push stream is open, 1326 the server SHOULD abruptly terminate that stream. If the push stream 1327 has already ended, the server MAY still abruptly terminate the stream 1328 or MAY take no action. 1330 When a server sends CANCEL_PUSH, it is indicating that it will not be 1331 fulfilling a promise and has not created a push stream. The client 1332 should not expect the corresponding promise to be fulfilled. 1334 Sending CANCEL_PUSH has no direct effect on the state of existing 1335 push streams. A server SHOULD NOT send a CANCEL_PUSH when it has 1336 already created a corresponding push stream, and a client SHOULD NOT 1337 send a CANCEL_PUSH when it has already received a corresponding push 1338 stream. 1340 A CANCEL_PUSH frame is sent on the control stream. Receiving a 1341 CANCEL_PUSH frame on a stream other than the control stream MUST be 1342 treated as a connection error of type H3_FRAME_UNEXPECTED. 1344 0 1 2 3 1345 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1346 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1347 | Push ID (i) ... 1348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1350 Figure 6: CANCEL_PUSH Frame Payload 1352 The CANCEL_PUSH frame carries a Push ID encoded as a variable-length 1353 integer. The Push ID identifies the server push that is being 1354 cancelled (see Section 7.2.5). If a CANCEL_PUSH frame is received 1355 which references a Push ID greater than currently allowed on the 1356 connection, this MUST be treated as a connection error of type 1357 H3_ID_ERROR. 1359 If the client receives a CANCEL_PUSH frame, that frame might identify 1360 a Push ID that has not yet been mentioned by a PUSH_PROMISE frame due 1361 to reordering. If a server receives a CANCEL_PUSH frame for a Push 1362 ID that has not yet been mentioned by a PUSH_PROMISE frame, this MUST 1363 be treated as a connection error of type H3_ID_ERROR. 1365 7.2.4. SETTINGS 1367 The SETTINGS frame (type=0x4) conveys configuration parameters that 1368 affect how endpoints communicate, such as preferences and constraints 1369 on peer behavior. Individually, a SETTINGS parameter can also be 1370 referred to as a "setting"; the identifier and value of each setting 1371 parameter can be referred to as a "setting identifier" and a "setting 1372 value". 1374 SETTINGS frames always apply to a connection, never a single stream. 1375 A SETTINGS frame MUST be sent as the first frame of each control 1376 stream (see Section 6.2.1) by each peer, and MUST NOT be sent 1377 subsequently. If an endpoint receives a second SETTINGS frame on the 1378 control stream, the endpoint MUST respond with a connection error of 1379 type H3_FRAME_UNEXPECTED. 1381 SETTINGS frames MUST NOT be sent on any stream other than the control 1382 stream. If an endpoint receives a SETTINGS frame on a different 1383 stream, the endpoint MUST respond with a connection error of type 1384 H3_FRAME_UNEXPECTED. 1386 SETTINGS parameters are not negotiated; they describe characteristics 1387 of the sending peer, which can be used by the receiving peer. 1388 However, a negotiation can be implied by the use of SETTINGS - each 1389 peer uses SETTINGS to advertise a set of supported values. The 1390 definition of the setting would describe how each peer combines the 1391 two sets to conclude which choice will be used. SETTINGS does not 1392 provide a mechanism to identify when the choice takes effect. 1394 Different values for the same parameter can be advertised by each 1395 peer. For example, a client might be willing to consume a very large 1396 response header, while servers are more cautious about request size. 1398 The same setting identifier MUST NOT occur more than once in the 1399 SETTINGS frame. A receiver MAY treat the presence of duplicate 1400 setting identifiers as a connection error of type H3_SETTINGS_ERROR. 1402 The payload of a SETTINGS frame consists of zero or more parameters. 1403 Each parameter consists of a setting identifier and a value, both 1404 encoded as QUIC variable-length integers. 1406 0 1 2 3 1407 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1408 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1409 | Identifier (i) ... 1410 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1411 | Value (i) ... 1412 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1414 Figure 7: SETTINGS Parameter Format 1416 An implementation MUST ignore the contents for any SETTINGS 1417 identifier it does not understand. 1419 7.2.4.1. Defined SETTINGS Parameters 1421 The following settings are defined in HTTP/3: 1423 SETTINGS_MAX_HEADER_LIST_SIZE (0x6): The default value is unlimited. 1424 See Section 4.1.1 for usage. 1426 Setting identifiers of the format "0x1f * N + 0x21" for integer 1427 values of N are reserved to exercise the requirement that unknown 1428 identifiers be ignored. Such settings have no defined meaning. 1429 Endpoints SHOULD include at least one such setting in their SETTINGS 1430 frame. Endpoints MUST NOT consider such settings to have any meaning 1431 upon receipt. 1433 Because the setting has no defined meaning, the value of the setting 1434 can be any value the implementation selects. 1436 Additional settings can be defined by extensions to HTTP/3; see 1437 Section 9 for more details. 1439 7.2.4.2. Initialization 1441 An HTTP implementation MUST NOT send frames or requests which would 1442 be invalid based on its current understanding of the peer's settings. 1444 All settings begin at an initial value. Each endpoint SHOULD use 1445 these initial values to send messages before the peer's SETTINGS 1446 frame has arrived, as packets carrying the settings can be lost or 1447 delayed. When the SETTINGS frame arrives, any settings are changed 1448 to their new values. 1450 This removes the need to wait for the SETTINGS frame before sending 1451 messages. Endpoints MUST NOT require any data to be received from 1452 the peer prior to sending the SETTINGS frame; settings MUST be sent 1453 as soon as the transport is ready to send data. 1455 For servers, the initial value of each client setting is the default 1456 value. 1458 For clients using a 1-RTT QUIC connection, the initial value of each 1459 server setting is the default value. 1-RTT keys will always become 1460 available prior to SETTINGS arriving, even if the server sends 1461 SETTINGS immediately. Clients SHOULD NOT wait indefinitely for 1462 SETTINGS to arrive before sending requests, but SHOULD process 1463 received datagrams in order to increase the likelihood of processing 1464 SETTINGS before sending the first request. 1466 When a 0-RTT QUIC connection is being used, the initial value of each 1467 server setting is the value used in the previous session. Clients 1468 SHOULD store the settings the server provided in the connection where 1469 resumption information was provided, but MAY opt not to store 1470 settings in certain cases (e.g., if the session ticket is received 1471 before the SETTINGS frame). A client MUST comply with stored 1472 settings - or default values, if no values are stored - when 1473 attempting 0-RTT. Once a server has provided new settings, clients 1474 MUST comply with those values. 1476 A server can remember the settings that it advertised, or store an 1477 integrity-protected copy of the values in the ticket and recover the 1478 information when accepting 0-RTT data. A server uses the HTTP/3 1479 settings values in determining whether to accept 0-RTT data. If the 1480 server cannot determine that the settings remembered by a client are 1481 compatible with its current settings, it MUST NOT accept 0-RTT data. 1482 Remembered settings are compatible if a client complying with those 1483 settings would not violate the server's current settings. 1485 A server MAY accept 0-RTT and subsequently provide different settings 1486 in its SETTINGS frame. If 0-RTT data is accepted by the server, its 1487 SETTINGS frame MUST NOT reduce any limits or alter any values that 1488 might be violated by the client with its 0-RTT data. The server MUST 1489 include all settings which differ from their default values. If a 1490 server accepts 0-RTT but then sends settings that are not compatible 1491 with the previously specified settings, this MUST be treated as a 1492 connection error of type H3_SETTINGS_ERROR. If a server accepts 1493 0-RTT but then sends a SETTINGS frame that omits a setting value that 1494 the client understands (apart from reserved setting identifiers) that 1495 was previously specified to have a non-default value, this MUST be 1496 treated as a connection error of type H3_SETTINGS_ERROR. 1498 7.2.5. PUSH_PROMISE 1500 The PUSH_PROMISE frame (type=0x5) is used to carry a promised request 1501 header set from server to client on a request stream, as in HTTP/2. 1503 0 1 2 3 1504 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1505 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1506 | Push ID (i) ... 1507 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1508 | Header Block (*) ... 1509 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1511 Figure 8: PUSH_PROMISE Frame Payload 1513 The payload consists of: 1515 Push ID: A variable-length integer that identifies the server push 1516 operation. A Push ID is used in push stream headers 1517 (Section 4.4), CANCEL_PUSH frames (Section 7.2.3). 1519 Header Block: QPACK-compressed request header fields for the 1520 promised response. See [QPACK] for more details. 1522 A server MUST NOT use a Push ID that is larger than the client has 1523 provided in a MAX_PUSH_ID frame (Section 7.2.7). A client MUST treat 1524 receipt of a PUSH_PROMISE frame that contains a larger Push ID than 1525 the client has advertised as a connection error of H3_ID_ERROR. 1527 A server MAY use the same Push ID in multiple PUSH_PROMISE frames. 1528 If so, the decompressed request header sets MUST contain the same 1529 fields in the same order, and both the name and and value in each 1530 field MUST be exact matches. Clients SHOULD compare the request 1531 header sets for resources promised multiple times. If a client 1532 receives a Push ID that has already been promised and detects a 1533 mismatch, it MUST respond with a connection error of type 1534 H3_GENERAL_PROTOCOL_ERROR. If the decompressed header sets match 1535 exactly, the client SHOULD associate the pushed content with each 1536 stream on which a PUSH_PROMISE was received. 1538 Allowing duplicate references to the same Push ID is primarily to 1539 reduce duplication caused by concurrent requests. A server SHOULD 1540 avoid reusing a Push ID over a long period. Clients are likely to 1541 consume server push responses and not retain them for reuse over 1542 time. Clients that see a PUSH_PROMISE that uses a Push ID that they 1543 have already consumed and discarded are forced to ignore the 1544 PUSH_PROMISE. 1546 If a PUSH_PROMISE frame is received on the control stream, the client 1547 MUST respond with a connection error (Section 8) of type 1548 H3_FRAME_UNEXPECTED. 1550 A client MUST NOT send a PUSH_PROMISE frame. A server MUST treat the 1551 receipt of a PUSH_PROMISE frame as a connection error of type 1552 H3_FRAME_UNEXPECTED. 1554 See Section 4.4 for a description of the overall server push 1555 mechanism. 1557 7.2.6. GOAWAY 1559 The GOAWAY frame (type=0x7) is used to initiate graceful shutdown of 1560 a connection by a server. GOAWAY allows a server to stop accepting 1561 new requests while still finishing processing of previously received 1562 requests. This enables administrative actions, like server 1563 maintenance. GOAWAY by itself does not close a connection. 1565 0 1 2 3 1566 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1567 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1568 | Stream ID (i) ... 1569 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1571 Figure 9: GOAWAY Frame Payload 1573 The GOAWAY frame is always sent on the control stream. It carries a 1574 QUIC Stream ID for a client-initiated bidirectional stream encoded as 1575 a variable-length integer. A client MUST treat receipt of a GOAWAY 1576 frame containing a Stream ID of any other type as a connection error 1577 of type H3_ID_ERROR. 1579 Clients do not need to send GOAWAY to initiate a graceful shutdown; 1580 they simply stop making new requests. A server MUST treat receipt of 1581 a GOAWAY frame on any stream as a connection error (Section 8) of 1582 type H3_FRAME_UNEXPECTED. 1584 The GOAWAY frame applies to the connection, not a specific stream. A 1585 client MUST treat a GOAWAY frame on a stream other than the control 1586 stream as a connection error (Section 8) of type H3_FRAME_UNEXPECTED. 1588 See Section 5.2 for more information on the use of the GOAWAY frame. 1590 7.2.7. MAX_PUSH_ID 1592 The MAX_PUSH_ID frame (type=0xD) is used by clients to control the 1593 number of server pushes that the server can initiate. This sets the 1594 maximum value for a Push ID that the server can use in PUSH_PROMISE 1595 and CANCEL_PUSH frames. Consequently, this also limits the number of 1596 push streams that the server can initiate in addition to the limit 1597 maintained by the QUIC transport. 1599 The MAX_PUSH_ID frame is always sent on the control stream. Receipt 1600 of a MAX_PUSH_ID frame on any other stream MUST be treated as a 1601 connection error of type H3_FRAME_UNEXPECTED. 1603 A server MUST NOT send a MAX_PUSH_ID frame. A client MUST treat the 1604 receipt of a MAX_PUSH_ID frame as a connection error of type 1605 H3_FRAME_UNEXPECTED. 1607 The maximum Push ID is unset when a connection is created, meaning 1608 that a server cannot push until it receives a MAX_PUSH_ID frame. A 1609 client that wishes to manage the number of promised server pushes can 1610 increase the maximum Push ID by sending MAX_PUSH_ID frames as the 1611 server fulfills or cancels server pushes. 1613 0 1 2 3 1614 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1615 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1616 | Push ID (i) ... 1617 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1619 Figure 10: MAX_PUSH_ID Frame Payload 1621 The MAX_PUSH_ID frame carries a single variable-length integer that 1622 identifies the maximum value for a Push ID that the server can use 1623 (see Section 7.2.5). A MAX_PUSH_ID frame cannot reduce the maximum 1624 Push ID; receipt of a MAX_PUSH_ID that contains a smaller value than 1625 previously received MUST be treated as a connection error of type 1626 H3_ID_ERROR. 1628 7.2.8. Reserved Frame Types 1630 Frame types of the format "0x1f * N + 0x21" for integer values of N 1631 are reserved to exercise the requirement that unknown types be 1632 ignored (Section 9). These frames have no semantics, and can be sent 1633 on any open stream when application-layer padding is desired. They 1634 MAY also be sent on connections where no data is currently being 1635 transferred. Endpoints MUST NOT consider these frames to have any 1636 meaning upon receipt. 1638 The payload and length of the frames are selected in any manner the 1639 implementation chooses. 1641 Frame types which were used in HTTP/2 where there is no corresponding 1642 HTTP/3 frame have also been reserved (Section 11.2.1). These frame 1643 types MUST NOT be sent, and receipt MAY be treated as an error of 1644 type H3_FRAME_UNEXPECTED. 1646 8. Error Handling 1648 QUIC allows the application to abruptly terminate (reset) individual 1649 streams or the entire connection when an error is encountered. These 1650 are referred to as "stream errors" or "connection errors" and are 1651 described in more detail in [QUIC-TRANSPORT]. 1653 An endpoint MAY choose to treat a stream error as a connection error 1654 under certain circumstances. Implementations need to consider the 1655 impact on outstanding requests before making this choice. 1657 Because new error codes can be defined without negotiation (see 1658 Section 9), use of an error code in an unexpected context or receipt 1659 of an unknown error code MUST be treated as equivalent to 1660 H3_NO_ERROR. However, closing a stream can have other effects 1661 regardless of the error code (see Section 4.1). 1663 This section describes HTTP/3-specific error codes which can be used 1664 to express the cause of a connection or stream error. 1666 8.1. HTTP/3 Error Codes 1668 The following error codes are defined for use when abruptly 1669 terminating streams, aborting reading of streams, or immediately 1670 closing connections. 1672 H3_NO_ERROR (0x100): No error. This is used when the connection or 1673 stream needs to be closed, but there is no error to signal. 1675 H3_GENERAL_PROTOCOL_ERROR (0x101): Peer violated protocol 1676 requirements in a way which doesn't match a more specific error 1677 code, or endpoint declines to use the more specific error code. 1679 H3_INTERNAL_ERROR (0x102): An internal error has occurred in the 1680 HTTP stack. 1682 H3_STREAM_CREATION_ERROR (0x103): The endpoint detected that its 1683 peer created a stream that it will not accept. 1685 H3_CLOSED_CRITICAL_STREAM (0x104): A stream required by the 1686 connection was closed or reset. 1688 H3_FRAME_UNEXPECTED (0x105): A frame was received which was not 1689 permitted in the current state or on the current stream. 1691 H3_FRAME_ERROR (0x106): A frame that fails to satisfy layout 1692 requirements or with an invalid size was received. 1694 H3_EXCESSIVE_LOAD (0x107): The endpoint detected that its peer is 1695 exhibiting a behavior that might be generating excessive load. 1697 H3_ID_ERROR (0x108): A Stream ID or Push ID was used incorrectly, 1698 such as exceeding a limit, reducing a limit, or being reused. 1700 H3_SETTINGS_ERROR (0x109): An endpoint detected an error in the 1701 payload of a SETTINGS frame. 1703 H3_MISSING_SETTINGS (0x10A): No SETTINGS frame was received at the 1704 beginning of the control stream. 1706 H3_REQUEST_REJECTED (0x10B): A server rejected a request without 1707 performing any application processing. 1709 H3_REQUEST_CANCELLED (0x10C): The request or its response (including 1710 pushed response) is cancelled. 1712 H3_REQUEST_INCOMPLETE (0x10D): The client's stream terminated 1713 without containing a fully-formed request. 1715 H3_CONNECT_ERROR (0x10F): The connection established in response to 1716 a CONNECT request was reset or abnormally closed. 1718 H3_VERSION_FALLBACK (0x110): The requested operation cannot be 1719 served over HTTP/3. The peer should retry over HTTP/1.1. 1721 Error codes of the format "0x1f * N + 0x21" for integer values of N 1722 are reserved to exercise the requirement that unknown error codes be 1723 treated as equivalent to H3_NO_ERROR (Section 9). Implementations 1724 SHOULD select an error code from this space with some probability 1725 when they would have sent H3_NO_ERROR. 1727 9. Extensions to HTTP/3 1729 HTTP/3 permits extension of the protocol. Within the limitations 1730 described in this section, protocol extensions can be used to provide 1731 additional services or alter any aspect of the protocol. Extensions 1732 are effective only within the scope of a single HTTP/3 connection. 1734 This applies to the protocol elements defined in this document. This 1735 does not affect the existing options for extending HTTP, such as 1736 defining new methods, status codes, or header fields. 1738 Extensions are permitted to use new frame types (Section 7.2), new 1739 settings (Section 7.2.4.1), new error codes (Section 8), or new 1740 unidirectional stream types (Section 6.2). Registries are 1741 established for managing these extension points: frame types 1742 (Section 11.2.1), settings (Section 11.2.2), error codes 1743 (Section 11.2.3), and stream types (Section 11.2.4). 1745 Implementations MUST ignore unknown or unsupported values in all 1746 extensible protocol elements. Implementations MUST discard frames 1747 and unidirectional streams that have unknown or unsupported types. 1748 This means that any of these extension points can be safely used by 1749 extensions without prior arrangement or negotiation. However, where 1750 a known frame type is required to be in a specific location, such as 1751 the SETTINGS frame as the first frame of the control stream (see 1752 Section 6.2.1), an unknown frame type does not satisfy that 1753 requirement and SHOULD be treated as an error. 1755 Extensions that could change the semantics of existing protocol 1756 components MUST be negotiated before being used. For example, an 1757 extension that changes the layout of the HEADERS frame cannot be used 1758 until the peer has given a positive signal that this is acceptable. 1759 Coordinating when such a revised layout comes into effect could prove 1760 complex. As such, allocating new identifiers for new definitions of 1761 existing protocol elements is likely to be more effective. 1763 This document doesn't mandate a specific method for negotiating the 1764 use of an extension but notes that a setting (Section 7.2.4.1) could 1765 be used for that purpose. If both peers set a value that indicates 1766 willingness to use the extension, then the extension can be used. If 1767 a setting is used for extension negotiation, the default value MUST 1768 be defined in such a fashion that the extension is disabled if the 1769 setting is omitted. 1771 10. Security Considerations 1773 The security considerations of HTTP/3 should be comparable to those 1774 of HTTP/2 with TLS; the considerations from Section 10 of [HTTP2] 1775 apply in addition to those listed here. 1777 When HTTP Alternative Services is used for discovery for HTTP/3 1778 endpoints, the security considerations of [ALTSVC] also apply. 1780 10.1. Traffic Analysis 1782 Where HTTP/2 employs PADDING frames and Padding fields in other 1783 frames to make a connection more resistant to traffic analysis, 1784 HTTP/3 can either rely on transport-layer padding or employ the 1785 reserved frame and stream types discussed in Section 7.2.8 and 1786 Section 6.2.3. These methods of padding produce different results in 1787 terms of the granularity of padding, how padding is arranged in 1788 relation to the information that is being protected, whether padding 1789 is applied in the case of packet loss, and how an implementation 1790 might control padding. 1792 10.2. Frame Parsing 1794 Several protocol elements contain nested length elements, typically 1795 in the form of frames with an explicit length containing variable- 1796 length integers. This could pose a security risk to an incautious 1797 implementer. An implementation MUST ensure that the length of a 1798 frame exactly matches the length of the fields it contains. 1800 10.3. Early Data 1802 The use of 0-RTT with HTTP/3 creates an exposure to replay attack. 1803 The anti-replay mitigations in [HTTP-REPLAY] MUST be applied when 1804 using HTTP/3 with 0-RTT. 1806 10.4. Migration 1808 Certain HTTP implementations use the client address for logging or 1809 access-control purposes. Since a QUIC client's address might change 1810 during a connection (and future versions might support simultaneous 1811 use of multiple addresses), such implementations will need to either 1812 actively retrieve the client's current address or addresses when they 1813 are relevant or explicitly accept that the original address might 1814 change. 1816 11. IANA Considerations 1818 This document registers a new ALPN protocol ID (Section 11.1) and 1819 creates new registries that manage the assignment of codepoints in 1820 HTTP/3. 1822 11.1. Registration of HTTP/3 Identification String 1824 This document creates a new registration for the identification of 1825 HTTP/3 in the "Application Layer Protocol Negotiation (ALPN) Protocol 1826 IDs" registry established in [RFC7301]. 1828 The "h3" string identifies HTTP/3: 1830 Protocol: HTTP/3 1832 Identification Sequence: 0x68 0x33 ("h3") 1834 Specification: This document 1836 11.2. New Registries 1838 New registries created in this document operate under the QUIC 1839 registration policy documented in Section 22.1 of [QUIC-TRANSPORT]. 1840 These registries all include the common set of fields listed in 1841 Section 22.1.1 of [QUIC-TRANSPORT]. 1843 The initial allocations in these registries created in this document 1844 are all assigned permanent status and list as contact both the IESG 1845 (iesg@ietf.org) and the HTTP working group (ietf-http-wg@w3.org). 1847 11.2.1. Frame Types 1849 This document establishes a registry for HTTP/3 frame type codes. 1850 The "HTTP/3 Frame Type" registry governs a 62-bit space. This 1851 registry follows the QUIC registry policy; see Section 11.2. 1852 Permanent registrations in this registry are assigned using the 1853 Specification Required policy [RFC8126], except for values between 1854 0x00 and 0x3f (in hexadecimal; inclusive), which are assigned using 1855 Standards Action or IESG Approval as defined in Section 4.9 and 4.10 1856 of [RFC8126]. 1858 While this registry is separate from the "HTTP/2 Frame Type" registry 1859 defined in [HTTP2], it is preferable that the assignments parallel 1860 each other where the code spaces overlap. If an entry is present in 1861 only one registry, every effort SHOULD be made to avoid assigning the 1862 corresponding value to an unrelated operation. 1864 In addition to common fields as described in Section 11.2, permanent 1865 registrations in this registry MUST include the following field: 1867 Frame Type: A name or label for the frame type. 1869 Specifications of frame types MUST include a description of the frame 1870 layout and its semantics, including any parts of the frame that are 1871 conditionally present. 1873 The entries in Table 2 are registered by this document. 1875 +--------------+-------+---------------+ 1876 | Frame Type | Value | Specification | 1877 +==============+=======+===============+ 1878 | DATA | 0x0 | Section 7.2.1 | 1879 +--------------+-------+---------------+ 1880 | HEADERS | 0x1 | Section 7.2.2 | 1881 +--------------+-------+---------------+ 1882 | Reserved | 0x2 | N/A | 1883 +--------------+-------+---------------+ 1884 | CANCEL_PUSH | 0x3 | Section 7.2.3 | 1885 +--------------+-------+---------------+ 1886 | SETTINGS | 0x4 | Section 7.2.4 | 1887 +--------------+-------+---------------+ 1888 | PUSH_PROMISE | 0x5 | Section 7.2.5 | 1889 +--------------+-------+---------------+ 1890 | Reserved | 0x6 | N/A | 1891 +--------------+-------+---------------+ 1892 | GOAWAY | 0x7 | Section 7.2.6 | 1893 +--------------+-------+---------------+ 1894 | Reserved | 0x8 | N/A | 1895 +--------------+-------+---------------+ 1896 | Reserved | 0x9 | N/A | 1897 +--------------+-------+---------------+ 1898 | MAX_PUSH_ID | 0xD | Section 7.2.7 | 1899 +--------------+-------+---------------+ 1901 Table 2: Initial HTTP/3 Frame Types 1903 Additionally, each code of the format "0x1f * N + 0x21" for integer 1904 values of N (that is, "0x21", "0x40", ..., through 1905 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 1907 11.2.2. Settings Parameters 1909 This document establishes a registry for HTTP/3 settings. The 1910 "HTTP/3 Settings" registry governs a 62-bit space. This registry 1911 follows the QUIC registry policy; see Section 11.2. Permanent 1912 registrations in this registry are assigned using the Specification 1913 Required policy [RFC8126], except for values between 0x00 and 0x3f 1914 (in hexadecimal; inclusive), which are assigned using Standards 1915 Action or IESG Approval as defined in Section 4.9 and 4.10 of 1916 [RFC8126]. 1918 While this registry is separate from the "HTTP/2 Settings" registry 1919 defined in [HTTP2], it is preferable that the assignments parallel 1920 each other. If an entry is present in only one registry, every 1921 effort SHOULD be made to avoid assigning the corresponding value to 1922 an unrelated operation. 1924 In addition to common fields as described in Section 11.2, permanent 1925 registrations in this registry MUST include the following fields: 1927 Setting Name: A symbolic name for the setting. Specifying a setting 1928 name is optional. 1930 Default: The value of the setting unless otherwise indicated. A 1931 default SHOULD be the most restrictive possible value. 1933 The entries in Table 3 are registered by this document. 1935 +----------------------+-------+-----------------+-----------+ 1936 | Setting Name | Value | Specification | Default | 1937 +======================+=======+=================+===========+ 1938 | Reserved | 0x2 | N/A | N/A | 1939 +----------------------+-------+-----------------+-----------+ 1940 | Reserved | 0x3 | N/A | N/A | 1941 +----------------------+-------+-----------------+-----------+ 1942 | Reserved | 0x4 | N/A | N/A | 1943 +----------------------+-------+-----------------+-----------+ 1944 | Reserved | 0x5 | N/A | N/A | 1945 +----------------------+-------+-----------------+-----------+ 1946 | MAX_HEADER_LIST_SIZE | 0x6 | Section 7.2.4.1 | Unlimited | 1947 +----------------------+-------+-----------------+-----------+ 1949 Table 3: Initial HTTP/3 Settings 1951 Additionally, each code of the format "0x1f * N + 0x21" for integer 1952 values of N (that is, "0x21", "0x40", ..., through 1953 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 1955 11.2.3. Error Codes 1957 This document establishes a registry for HTTP/3 error codes. The 1958 "HTTP/3 Error Code" registry manages a 62-bit space. This registry 1959 follows the QUIC registry policy; see Section 11.2. Permanent 1960 registrations in this registry are assigned using the Specification 1961 Required policy [RFC8126], except for values between 0x00 and 0x3f 1962 (in hexadecimal; inclusive), which are assigned using Standards 1963 Action or IESG Approval as defined in Section 4.9 and 4.10 of 1964 [RFC8126]. 1966 Registrations for error codes are required to include a description 1967 of the error code. An expert reviewer is advised to examine new 1968 registrations for possible duplication with existing error codes. 1969 Use of existing registrations is to be encouraged, but not mandated. 1971 In addition to common fields as described in Section 11.2, permanent 1972 registrations in this registry MUST include the following fields: 1974 Name: A name for the error code. Specifying an error code name is 1975 optional. 1977 Description: A brief description of the error code semantics. 1979 The entries in the Table 4 are registered by this document. 1981 +---------------------------+--------+--------------+---------------+ 1982 | Name | Value | Description | Specification | 1983 +===========================+========+==============+===============+ 1984 | H3_NO_ERROR | 0x0100 | No error | Section 8.1 | 1985 +---------------------------+--------+--------------+---------------+ 1986 | H3_GENERAL_PROTOCOL_ERROR | 0x0101 | General | Section 8.1 | 1987 | | | protocol | | 1988 | | | error | | 1989 +---------------------------+--------+--------------+---------------+ 1990 | H3_INTERNAL_ERROR | 0x0102 | Internal | Section 8.1 | 1991 | | | error | | 1992 +---------------------------+--------+--------------+---------------+ 1993 | H3_STREAM_CREATION_ERROR | 0x0103 | Stream | Section 8.1 | 1994 | | | creation | | 1995 | | | error | | 1996 +---------------------------+--------+--------------+---------------+ 1997 | H3_CLOSED_CRITICAL_STREAM | 0x0104 | Critical | Section 8.1 | 1998 | | | stream was | | 1999 | | | closed | | 2000 +---------------------------+--------+--------------+---------------+ 2001 | H3_FRAME_UNEXPECTED | 0x0105 | Frame not | Section 8.1 | 2002 | | | permitted | | 2003 | | | in the | | 2004 | | | current | | 2005 | | | state | | 2006 +---------------------------+--------+--------------+---------------+ 2007 | H3_FRAME_ERROR | 0x0106 | Frame | Section 8.1 | 2008 | | | violated | | 2009 | | | layout or | | 2010 | | | size rules | | 2011 +---------------------------+--------+--------------+---------------+ 2012 | H3_EXCESSIVE_LOAD | 0x0107 | Peer | Section 8.1 | 2013 | | | generating | | 2014 | | | excessive | | 2015 | | | load | | 2016 +---------------------------+--------+--------------+---------------+ 2017 | H3_ID_ERROR | 0x0108 | An | Section 8.1 | 2018 | | | identifier | | 2019 | | | was used | | 2020 | | | incorrectly | | 2021 +---------------------------+--------+--------------+---------------+ 2022 | H3_SETTINGS_ERROR | 0x0109 | SETTINGS | Section 8.1 | 2023 | | | frame | | 2024 | | | contained | | 2025 | | | invalid | | 2026 | | | values | | 2027 +---------------------------+--------+--------------+---------------+ 2028 | H3_MISSING_SETTINGS | 0x010A | No SETTINGS | Section 8.1 | 2029 | | | frame | | 2030 | | | received | | 2031 +---------------------------+--------+--------------+---------------+ 2032 | H3_REQUEST_REJECTED | 0x010B | Request not | Section 8.1 | 2033 | | | processed | | 2034 +---------------------------+--------+--------------+---------------+ 2035 | H3_REQUEST_CANCELLED | 0x010C | Data no | Section 8.1 | 2036 | | | longer | | 2037 | | | needed | | 2038 +---------------------------+--------+--------------+---------------+ 2039 | H3_REQUEST_INCOMPLETE | 0x010D | Stream | Section 8.1 | 2040 | | | terminated | | 2041 | | | early | | 2042 +---------------------------+--------+--------------+---------------+ 2043 | H3_CONNECT_ERROR | 0x010F | TCP reset | Section 8.1 | 2044 | | | or error on | | 2045 | | | CONNECT | | 2046 | | | request | | 2047 +---------------------------+--------+--------------+---------------+ 2048 | H3_VERSION_FALLBACK | 0x0110 | Retry over | Section 8.1 | 2049 | | | HTTP/1.1 | | 2050 +---------------------------+--------+--------------+---------------+ 2051 Table 4: Initial HTTP/3 Error Codes 2053 Additionally, each code of the format "0x1f * N + 0x21" for integer 2054 values of N (that is, "0x21", "0x40", ..., through 2055 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 2057 11.2.4. Stream Types 2059 This document establishes a registry for HTTP/3 unidirectional stream 2060 types. The "HTTP/3 Stream Type" registry governs a 62-bit space. 2061 This registry follows the QUIC registry policy; see Section 11.2. 2062 Permanent registrations in this registry are assigned using the 2063 Specification Required policy [RFC8126], except for values between 2064 0x00 and 0x3f (in hexadecimal; inclusive), which are assigned using 2065 Standards Action or IESG Approval as defined in Section 4.9 and 4.10 2066 of [RFC8126]. 2068 In addition to common fields as described in Section 11.2, permanent 2069 registrations in this registry MUST include the following fields: 2071 Stream Type: A name or label for the stream type. 2073 Sender: Which endpoint on a connection may initiate a stream of this 2074 type. Values are "Client", "Server", or "Both". 2076 Specifications for permanent registrations MUST include a description 2077 of the stream type, including the layout semantics of the stream 2078 contents. 2080 The entries in the following table are registered by this document. 2082 +----------------+-------+---------------+--------+ 2083 | Stream Type | Value | Specification | Sender | 2084 +================+=======+===============+========+ 2085 | Control Stream | 0x00 | Section 6.2.1 | Both | 2086 +----------------+-------+---------------+--------+ 2087 | Push Stream | 0x01 | Section 4.4 | Server | 2088 +----------------+-------+---------------+--------+ 2090 Table 5 2092 Additionally, each code of the format "0x1f * N + 0x21" for integer 2093 values of N (that is, "0x21", "0x40", ..., through 2094 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 2096 12. References 2098 12.1. Normative References 2100 [ALTSVC] Nottingham, M., McManus, P., and J. Reschke, "HTTP 2101 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 2102 April 2016, . 2104 [HTTP-REPLAY] 2105 Thomson, M., Nottingham, M., and W. Tarreau, "Using Early 2106 Data in HTTP", RFC 8470, DOI 10.17487/RFC8470, September 2107 2018, . 2109 [HTTP2] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 2110 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 2111 DOI 10.17487/RFC7540, May 2015, 2112 . 2114 [QPACK] Krasic, C., Bishop, M., and A. Frindell, Ed., "QPACK: 2115 Header Compression for HTTP over QUIC", Work in Progress, 2116 Internet-Draft, draft-ietf-quic-qpack-13, 21 February 2117 2020, 2118 . 2120 [QUIC-TRANSPORT] 2121 Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based 2122 Multiplexed and Secure Transport", Work in Progress, 2123 Internet-Draft, draft-ietf-quic-transport-26, 21 February 2124 2020, . 2127 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 2128 RFC 793, DOI 10.17487/RFC0793, September 1981, 2129 . 2131 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2132 Requirement Levels", BCP 14, RFC 2119, 2133 DOI 10.17487/RFC2119, March 1997, 2134 . 2136 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2137 Resource Identifier (URI): Generic Syntax", STD 66, 2138 RFC 3986, DOI 10.17487/RFC3986, January 2005, 2139 . 2141 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 2142 Specifications: ABNF", STD 68, RFC 5234, 2143 DOI 10.17487/RFC5234, January 2008, 2144 . 2146 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 2147 Extensions: Extension Definitions", RFC 6066, 2148 DOI 10.17487/RFC6066, January 2011, 2149 . 2151 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 2152 DOI 10.17487/RFC6265, April 2011, 2153 . 2155 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2156 Protocol (HTTP/1.1): Message Syntax and Routing", 2157 RFC 7230, DOI 10.17487/RFC7230, June 2014, 2158 . 2160 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2161 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2162 DOI 10.17487/RFC7231, June 2014, 2163 . 2165 [RFC7838] Nottingham, M., McManus, P., and J. Reschke, "HTTP 2166 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 2167 April 2016, . 2169 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2170 Writing an IANA Considerations Section in RFCs", BCP 26, 2171 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2172 . 2174 [RFC8164] Nottingham, M. and M. Thomson, "Opportunistic Security for 2175 HTTP/2", RFC 8164, DOI 10.17487/RFC8164, May 2017, 2176 . 2178 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2179 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2180 May 2017, . 2182 12.2. Informative References 2184 [HPACK] Peon, R. and H. Ruellan, "HPACK: Header Compression for 2185 HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015, 2186 . 2188 [RFC6585] Nottingham, M. and R. Fielding, "Additional HTTP Status 2189 Codes", RFC 6585, DOI 10.17487/RFC6585, April 2012, 2190 . 2192 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 2193 "Transport Layer Security (TLS) Application-Layer Protocol 2194 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 2195 July 2014, . 2197 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 2198 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 2199 . 2201 Appendix A. Considerations for Transitioning from HTTP/2 2203 HTTP/3 is strongly informed by HTTP/2, and bears many similarities. 2204 This section describes the approach taken to design HTTP/3, points 2205 out important differences from HTTP/2, and describes how to map 2206 HTTP/2 extensions into HTTP/3. 2208 HTTP/3 begins from the premise that similarity to HTTP/2 is 2209 preferable, but not a hard requirement. HTTP/3 departs from HTTP/2 2210 where QUIC differs from TCP, either to take advantage of QUIC 2211 features (like streams) or to accommodate important shortcomings 2212 (such as a lack of total ordering). These differences make HTTP/3 2213 similar to HTTP/2 in key aspects, such as the relationship of 2214 requests and responses to streams. However, the details of the 2215 HTTP/3 design are substantially different than HTTP/2. 2217 These departures are noted in this section. 2219 A.1. Streams 2221 HTTP/3 permits use of a larger number of streams (2^62-1) than 2222 HTTP/2. The considerations about exhaustion of stream identifier 2223 space apply, though the space is significantly larger such that it is 2224 likely that other limits in QUIC are reached first, such as the limit 2225 on the connection flow control window. 2227 In contrast to HTTP/2, stream concurrency in HTTP/3 is managed by 2228 QUIC. QUIC considers a stream closed when all data has been received 2229 and sent data has been acknowledged by the peer. HTTP/2 considers a 2230 stream closed when the frame containing the END_STREAM bit has been 2231 committed to the transport. As a result, the stream for an 2232 equivalent exchange could remain "active" for a longer period of 2233 time. HTTP/3 servers might choose to permit a larger number of 2234 concurrent client-initiated bidirectional streams to achieve 2235 equivalent concurrency to HTTP/2, depending on the expected usage 2236 patterns. 2238 Due to the presence of other unidirectional stream types, HTTP/3 does 2239 not rely exclusively on the number of concurrent unidirectional 2240 streams to control the number of concurrent in-flight pushes. 2241 Instead, HTTP/3 clients use the MAX_PUSH_ID frame to control the 2242 number of pushes received from an HTTP/3 server. 2244 A.2. HTTP Frame Types 2246 Many framing concepts from HTTP/2 can be elided on QUIC, because the 2247 transport deals with them. Because frames are already on a stream, 2248 they can omit the stream number. Because frames do not block 2249 multiplexing (QUIC's multiplexing occurs below this layer), the 2250 support for variable-maximum-length packets can be removed. Because 2251 stream termination is handled by QUIC, an END_STREAM flag is not 2252 required. This permits the removal of the Flags field from the 2253 generic frame layout. 2255 Frame payloads are largely drawn from [HTTP2]. However, QUIC 2256 includes many features (e.g., flow control) which are also present in 2257 HTTP/2. In these cases, the HTTP mapping does not re-implement them. 2258 As a result, several HTTP/2 frame types are not required in HTTP/3. 2259 Where an HTTP/2-defined frame is no longer used, the frame ID has 2260 been reserved in order to maximize portability between HTTP/2 and 2261 HTTP/3 implementations. However, even equivalent frames between the 2262 two mappings are not identical. 2264 Many of the differences arise from the fact that HTTP/2 provides an 2265 absolute ordering between frames across all streams, while QUIC 2266 provides this guarantee on each stream only. As a result, if a frame 2267 type makes assumptions that frames from different streams will still 2268 be received in the order sent, HTTP/3 will break them. 2270 Some examples of feature adaptations are described below, as well as 2271 general guidance to extension frame implementors converting an HTTP/2 2272 extension to HTTP/3. 2274 A.2.1. Prioritization Differences 2276 HTTP/2 specifies priority assignments in PRIORITY frames and 2277 (optionally) in HEADERS frames. HTTP/3 does not provide a means of 2278 signaling priority. 2280 Note that while there is no explicit signaling for priority, this 2281 does not mean that prioritization is not important for achieving good 2282 performance. 2284 A.2.2. Header Compression Differences 2286 HPACK was designed with the assumption of in-order delivery. A 2287 sequence of encoded header blocks must arrive (and be decoded) at an 2288 endpoint in the same order in which they were encoded. This ensures 2289 that the dynamic state at the two endpoints remains in sync. 2291 Because this total ordering is not provided by QUIC, HTTP/3 uses a 2292 modified version of HPACK, called QPACK. QPACK uses a single 2293 unidirectional stream to make all modifications to the dynamic table, 2294 ensuring a total order of updates. All frames which contain encoded 2295 headers merely reference the table state at a given time without 2296 modifying it. 2298 [QPACK] provides additional details. 2300 A.2.3. Guidance for New Frame Type Definitions 2302 Frame type definitions in HTTP/3 often use the QUIC variable-length 2303 integer encoding. In particular, Stream IDs use this encoding, which 2304 allows for a larger range of possible values than the encoding used 2305 in HTTP/2. Some frames in HTTP/3 use an identifier rather than a 2306 Stream ID (e.g., Push IDs). Redefinition of the encoding of 2307 extension frame types might be necessary if the encoding includes a 2308 Stream ID. 2310 Because the Flags field is not present in generic HTTP/3 frames, 2311 those frames which depend on the presence of flags need to allocate 2312 space for flags as part of their frame payload. 2314 Other than this issue, frame type HTTP/2 extensions are typically 2315 portable to QUIC simply by replacing Stream 0 in HTTP/2 with a 2316 control stream in HTTP/3. HTTP/3 extensions will not assume 2317 ordering, but would not be harmed by ordering, and would be portable 2318 to HTTP/2 in the same manner. 2320 A.2.4. Mapping Between HTTP/2 and HTTP/3 Frame Types 2322 DATA (0x0): Padding is not defined in HTTP/3 frames. See 2323 Section 7.2.1. 2325 HEADERS (0x1): The PRIORITY region of HEADERS is not defined in 2326 HTTP/3 frames. Padding is not defined in HTTP/3 frames. See 2327 Section 7.2.2. 2329 PRIORITY (0x2): As described in Appendix A.2.1, HTTP/3 does not 2330 provide a means of signaling priority. 2332 RST_STREAM (0x3): RST_STREAM frames do not exist, since QUIC 2333 provides stream lifecycle management. The same code point is used 2334 for the CANCEL_PUSH frame (Section 7.2.3). 2336 SETTINGS (0x4): SETTINGS frames are sent only at the beginning of 2337 the connection. See Section 7.2.4 and Appendix A.3. 2339 PUSH_PROMISE (0x5): The PUSH_PROMISE does not reference a stream; 2340 instead the push stream references the PUSH_PROMISE frame using a 2341 Push ID. See Section 7.2.5. 2343 PING (0x6): PING frames do not exist, since QUIC provides equivalent 2344 functionality. 2346 GOAWAY (0x7): GOAWAY is sent only from server to client and does not 2347 contain an error code. See Section 7.2.6. 2349 WINDOW_UPDATE (0x8): WINDOW_UPDATE frames do not exist, since QUIC 2350 provides flow control. 2352 CONTINUATION (0x9): CONTINUATION frames do not exist; instead, 2353 larger HEADERS/PUSH_PROMISE frames than HTTP/2 are permitted. 2355 Frame types defined by extensions to HTTP/2 need to be separately 2356 registered for HTTP/3 if still applicable. The IDs of frames defined 2357 in [HTTP2] have been reserved for simplicity. Note that the frame 2358 type space in HTTP/3 is substantially larger (62 bits versus 8 bits), 2359 so many HTTP/3 frame types have no equivalent HTTP/2 code points. 2360 See Section 11.2.1. 2362 A.3. HTTP/2 SETTINGS Parameters 2364 An important difference from HTTP/2 is that settings are sent once, 2365 as the first frame of the control stream, and thereafter cannot 2366 change. This eliminates many corner cases around synchronization of 2367 changes. 2369 Some transport-level options that HTTP/2 specifies via the SETTINGS 2370 frame are superseded by QUIC transport parameters in HTTP/3. The 2371 HTTP-level options that are retained in HTTP/3 have the same value as 2372 in HTTP/2. 2374 Below is a listing of how each HTTP/2 SETTINGS parameter is mapped: 2376 SETTINGS_HEADER_TABLE_SIZE: See [QPACK]. 2378 SETTINGS_ENABLE_PUSH: This is removed in favor of the MAX_PUSH_ID 2379 which provides a more granular control over server push. 2381 SETTINGS_MAX_CONCURRENT_STREAMS: QUIC controls the largest open 2382 Stream ID as part of its flow control logic. Specifying 2383 SETTINGS_MAX_CONCURRENT_STREAMS in the SETTINGS frame is an error. 2385 SETTINGS_INITIAL_WINDOW_SIZE: QUIC requires both stream and 2386 connection flow control window sizes to be specified in the 2387 initial transport handshake. Specifying 2388 SETTINGS_INITIAL_WINDOW_SIZE in the SETTINGS frame is an error. 2390 SETTINGS_MAX_FRAME_SIZE: This setting has no equivalent in HTTP/3. 2391 Specifying it in the SETTINGS frame is an error. 2393 SETTINGS_MAX_HEADER_LIST_SIZE: See Section 7.2.4.1. 2395 In HTTP/3, setting values are variable-length integers (6, 14, 30, or 2396 62 bits long) rather than fixed-length 32-bit fields as in HTTP/2. 2397 This will often produce a shorter encoding, but can produce a longer 2398 encoding for settings which use the full 32-bit space. Settings 2399 ported from HTTP/2 might choose to redefine their value to limit it 2400 to 30 bits for more efficient encoding, or to make use of the 62-bit 2401 space if more than 30 bits are required. 2403 Settings need to be defined separately for HTTP/2 and HTTP/3. The 2404 IDs of settings defined in [HTTP2] have been reserved for simplicity. 2405 Note that the settings identifier space in HTTP/3 is substantially 2406 larger (62 bits versus 16 bits), so many HTTP/3 settings have no 2407 equivalent HTTP/2 code point. See Section 11.2.2. 2409 As QUIC streams might arrive out-of-order, endpoints are advised to 2410 not wait for the peers' settings to arrive before responding to other 2411 streams. See Section 7.2.4.2. 2413 A.4. HTTP/2 Error Codes 2415 QUIC has the same concepts of "stream" and "connection" errors that 2416 HTTP/2 provides. However, there is no direct portability of HTTP/2 2417 error codes to HTTP/3 error codes; the values are shifted in order to 2418 prevent accidental or implicit conversion. 2420 The HTTP/2 error codes defined in Section 7 of [HTTP2] logically map 2421 to the HTTP/3 error codes as follows: 2423 NO_ERROR (0x0): H3_NO_ERROR in Section 8.1. 2425 PROTOCOL_ERROR (0x1): This is mapped to H3_GENERAL_PROTOCOL_ERROR 2426 except in cases where more specific error codes have been defined. 2427 This includes H3_FRAME_UNEXPECTED and H3_CLOSED_CRITICAL_STREAM 2428 defined in Section 8.1. 2430 INTERNAL_ERROR (0x2): H3_INTERNAL_ERROR in Section 8.1. 2432 FLOW_CONTROL_ERROR (0x3): Not applicable, since QUIC handles flow 2433 control. 2435 SETTINGS_TIMEOUT (0x4): Not applicable, since no acknowledgement of 2436 SETTINGS is defined. 2438 STREAM_CLOSED (0x5): Not applicable, since QUIC handles stream 2439 management. 2441 FRAME_SIZE_ERROR (0x6): H3_FRAME_ERROR error code defined in 2442 Section 8.1. 2444 REFUSED_STREAM (0x7): H3_REQUEST_REJECTED (in Section 8.1) is used 2445 to indicate that a request was not processed. Otherwise, not 2446 applicable because QUIC handles stream management. 2448 CANCEL (0x8): H3_REQUEST_CANCELLED in Section 8.1. 2450 COMPRESSION_ERROR (0x9): Multiple error codes are defined in 2451 [QPACK]. 2453 CONNECT_ERROR (0xa): H3_CONNECT_ERROR in Section 8.1. 2455 ENHANCE_YOUR_CALM (0xb): H3_EXCESSIVE_LOAD in Section 8.1. 2457 INADEQUATE_SECURITY (0xc): Not applicable, since QUIC is assumed to 2458 provide sufficient security on all connections. 2460 H3_1_1_REQUIRED (0xd): H3_VERSION_FALLBACK in Section 8.1. 2462 Error codes need to be defined for HTTP/2 and HTTP/3 separately. See 2463 Section 11.2.3. 2465 Appendix B. Change Log 2467 *RFC Editor's Note:* Please remove this section prior to 2468 publication of a final version of this document. 2470 B.1. Since draft-ietf-quic-http-25 2472 * Require QUICv1 for HTTP/3 (#3117, #3323) 2474 * Remove DUPLICATE_PUSH and allow duplicate PUSH_PROMISE (#3275, 2475 #3309) 2477 * Clarify the definition of "malformed" (#3352, #3345) 2479 B.2. Since draft-ietf-quic-http-24 2481 * Removed H3_EARLY_RESPONSE error code; H3_NO_ERROR is recommended 2482 instead (#3130,#3208) 2484 * Unknown error codes are equivalent to H3_NO_ERROR (#3276,#3331) 2486 * Some error codes are reserved for greasing (#3325,#3360) 2488 B.3. Since draft-ietf-quic-http-23 2490 * Removed "quic" Alt-Svc parameter (#3061,#3118) 2492 * Clients need not persist unknown settings for use in 0-RTT 2493 (#3110,#3113) 2495 * Clarify error cases around CANCEL_PUSH (#2819,#3083) 2497 B.4. Since draft-ietf-quic-http-22 2499 * Removed priority signaling (#2922,#2924) 2501 * Further changes to error codes (#2662,#2551): 2503 - Error codes renumbered 2505 - HTTP_MALFORMED_FRAME replaced by HTTP_FRAME_ERROR, 2506 HTTP_ID_ERROR, and others 2508 * Clarify how unknown frame types interact with required frame 2509 sequence (#2867,#2858) 2511 * Describe interactions with the transport in terms of defined 2512 interface terms (#2857,#2805) 2514 * Require the use of the "http-opportunistic" resource (RFC 8164) 2515 when scheme is "http" (#2439,#2973) 2517 * Settings identifiers cannot be duplicated (#2979) 2519 * Changes to SETTINGS frames in 0-RTT (#2972,#2790,#2945): 2521 - Servers must send all settings with non-default values in their 2522 SETTINGS frame, even when resuming 2524 - If a client doesn't have settings associated with a 0-RTT 2525 ticket, it uses the defaults 2527 - Servers can't accept early data if they cannot recover the 2528 settings the client will have remembered 2530 * Clarify that Upgrade and the 101 status code are prohibited 2531 (#2898,#2889) 2533 * Clarify that frame types reserved for greasing can occur on any 2534 stream, but frame types reserved due to HTTP/2 correspondence are 2535 prohibited (#2997,#2692,#2693) 2537 * Unknown error codes cannot be treated as errors (#2998,#2816) 2539 B.5. Since draft-ietf-quic-http-21 2541 No changes 2543 B.6. Since draft-ietf-quic-http-20 2545 * Prohibit closing the control stream (#2509, #2666) 2547 * Change default priority to use an orphan node (#2502, #2690) 2549 * Exclusive priorities are restored (#2754, #2781) 2551 * Restrict use of frames when using CONNECT (#2229, #2702) 2553 * Close and maybe reset streams if a connection error occurs for 2554 CONNECT (#2228, #2703) 2556 * Encourage provision of sufficient unidirectional streams for QPACK 2557 (#2100, #2529, #2762) 2559 * Allow extensions to use server-initiated bidirectional streams 2560 (#2711, #2773) 2562 * Clarify use of maximum header list size setting (#2516, #2774) 2564 * Extensive changes to error codes and conditions of their sending 2566 - Require connection errors for more error conditions (#2511, 2567 #2510) 2569 - Updated the error codes for illegal GOAWAY frames (#2714, 2570 #2707) 2572 - Specified error code for HEADERS on control stream (#2708) 2574 - Specified error code for servers receiving PUSH_PROMISE (#2709) 2576 - Specified error code for receiving DATA before HEADERS (#2715) 2578 - Describe malformed messages and their handling (#2410, #2764) 2580 - Remove HTTP_PUSH_ALREADY_IN_CACHE error (#2812, #2813) 2581 - Refactor Push ID related errors (#2818, #2820) 2583 - Rationalize HTTP/3 stream creation errors (#2821, #2822) 2585 B.7. Since draft-ietf-quic-http-19 2587 * SETTINGS_NUM_PLACEHOLDERS is 0x9 (#2443,#2530) 2589 * Non-zero bits in the Empty field of the PRIORITY frame MAY be 2590 treated as an error (#2501) 2592 B.8. Since draft-ietf-quic-http-18 2594 * Resetting streams following a GOAWAY is recommended, but not 2595 required (#2256,#2457) 2597 * Use variable-length integers throughout (#2437,#2233,#2253,#2275) 2599 - Variable-length frame types, stream types, and settings 2600 identifiers 2602 - Renumbered stream type assignments 2604 - Modified associated reserved values 2606 * Frame layout switched from Length-Type-Value to Type-Length-Value 2607 (#2395,#2235) 2609 * Specified error code for servers receiving DUPLICATE_PUSH (#2497) 2611 * Use connection error for invalid PRIORITY (#2507, #2508) 2613 B.9. Since draft-ietf-quic-http-17 2615 * HTTP_REQUEST_REJECTED is used to indicate a request can be retried 2616 (#2106, #2325) 2618 * Changed error code for GOAWAY on the wrong stream (#2231, #2343) 2620 B.10. Since draft-ietf-quic-http-16 2622 * Rename "HTTP/QUIC" to "HTTP/3" (#1973) 2624 * Changes to PRIORITY frame (#1865, #2075) 2626 - Permitted as first frame of request streams 2628 - Remove exclusive reprioritization 2629 - Changes to Prioritized Element Type bits 2631 * Define DUPLICATE_PUSH frame to refer to another PUSH_PROMISE 2632 (#2072) 2634 * Set defaults for settings, allow request before receiving SETTINGS 2635 (#1809, #1846, #2038) 2637 * Clarify message processing rules for streams that aren't closed 2638 (#1972, #2003) 2640 * Removed reservation of error code 0 and moved HTTP_NO_ERROR to 2641 this value (#1922) 2643 * Removed prohibition of zero-length DATA frames (#2098) 2645 B.11. Since draft-ietf-quic-http-15 2647 Substantial editorial reorganization; no technical changes. 2649 B.12. Since draft-ietf-quic-http-14 2651 * Recommend sensible values for QUIC transport parameters 2652 (#1720,#1806) 2654 * Define error for missing SETTINGS frame (#1697,#1808) 2656 * Setting values are variable-length integers (#1556,#1807) and do 2657 not have separate maximum values (#1820) 2659 * Expanded discussion of connection closure (#1599,#1717,#1712) 2661 * HTTP_VERSION_FALLBACK falls back to HTTP/1.1 (#1677,#1685) 2663 B.13. Since draft-ietf-quic-http-13 2665 * Reserved some frame types for grease (#1333, #1446) 2667 * Unknown unidirectional stream types are tolerated, not errors; 2668 some reserved for grease (#1490, #1525) 2670 * Require settings to be remembered for 0-RTT, prohibit reductions 2671 (#1541, #1641) 2673 * Specify behavior for truncated requests (#1596, #1643) 2675 B.14. Since draft-ietf-quic-http-12 2676 * TLS SNI extension isn't mandatory if an alternative method is used 2677 (#1459, #1462, #1466) 2679 * Removed flags from HTTP/3 frames (#1388, #1398) 2681 * Reserved frame types and settings for use in preserving 2682 extensibility (#1333, #1446) 2684 * Added general error code (#1391, #1397) 2686 * Unidirectional streams carry a type byte and are extensible 2687 (#910,#1359) 2689 * Priority mechanism now uses explicit placeholders to enable 2690 persistent structure in the tree (#441,#1421,#1422) 2692 B.15. Since draft-ietf-quic-http-11 2694 * Moved QPACK table updates and acknowledgments to dedicated streams 2695 (#1121, #1122, #1238) 2697 B.16. Since draft-ietf-quic-http-10 2699 * Settings need to be remembered when attempting and accepting 0-RTT 2700 (#1157, #1207) 2702 B.17. Since draft-ietf-quic-http-09 2704 * Selected QCRAM for header compression (#228, #1117) 2706 * The server_name TLS extension is now mandatory (#296, #495) 2708 * Specified handling of unsupported versions in Alt-Svc (#1093, 2709 #1097) 2711 B.18. Since draft-ietf-quic-http-08 2713 * Clarified connection coalescing rules (#940, #1024) 2715 B.19. Since draft-ietf-quic-http-07 2717 * Changes for integer encodings in QUIC (#595,#905) 2719 * Use unidirectional streams as appropriate (#515, #240, #281, #886) 2721 * Improvement to the description of GOAWAY (#604, #898) 2723 * Improve description of server push usage (#947, #950, #957) 2725 B.20. Since draft-ietf-quic-http-06 2727 * Track changes in QUIC error code usage (#485) 2729 B.21. Since draft-ietf-quic-http-05 2731 * Made push ID sequential, add MAX_PUSH_ID, remove 2732 SETTINGS_ENABLE_PUSH (#709) 2734 * Guidance about keep-alive and QUIC PINGs (#729) 2736 * Expanded text on GOAWAY and cancellation (#757) 2738 B.22. Since draft-ietf-quic-http-04 2740 * Cite RFC 5234 (#404) 2742 * Return to a single stream per request (#245,#557) 2744 * Use separate frame type and settings registries from HTTP/2 (#81) 2746 * SETTINGS_ENABLE_PUSH instead of SETTINGS_DISABLE_PUSH (#477) 2748 * Restored GOAWAY (#696) 2750 * Identify server push using Push ID rather than a stream ID 2751 (#702,#281) 2753 * DATA frames cannot be empty (#700) 2755 B.23. Since draft-ietf-quic-http-03 2757 None. 2759 B.24. Since draft-ietf-quic-http-02 2761 * Track changes in transport draft 2763 B.25. Since draft-ietf-quic-http-01 2765 * SETTINGS changes (#181): 2767 - SETTINGS can be sent only once at the start of a connection; no 2768 changes thereafter 2770 - SETTINGS_ACK removed 2772 - Settings can only occur in the SETTINGS frame a single time 2773 - Boolean format updated 2775 * Alt-Svc parameter changed from "v" to "quic"; format updated 2776 (#229) 2778 * Closing the connection control stream or any message control 2779 stream is a fatal error (#176) 2781 * HPACK Sequence counter can wrap (#173) 2783 * 0-RTT guidance added 2785 * Guide to differences from HTTP/2 and porting HTTP/2 extensions 2786 added (#127,#242) 2788 B.26. Since draft-ietf-quic-http-00 2790 * Changed "HTTP/2-over-QUIC" to "HTTP/QUIC" throughout (#11,#29) 2792 * Changed from using HTTP/2 framing within Stream 3 to new framing 2793 format and two-stream-per-request model (#71,#72,#73) 2795 * Adopted SETTINGS format from draft-bishop-httpbis-extended- 2796 settings-01 2798 * Reworked SETTINGS_ACK to account for indeterminate inter-stream 2799 order (#75) 2801 * Described CONNECT pseudo-method (#95) 2803 * Updated ALPN token and Alt-Svc guidance (#13,#87) 2805 * Application-layer-defined error codes (#19,#74) 2807 B.27. Since draft-shade-quic-http2-mapping-00 2809 * Adopted as base for draft-ietf-quic-http 2811 * Updated authors/editors list 2813 Acknowledgements 2815 The original authors of this specification were Robbie Shade and Mike 2816 Warres. 2818 A substantial portion of Mike's contribution was supported by 2819 Microsoft during his employment there. 2821 Author's Address 2823 Mike Bishop (editor) 2824 Akamai 2826 Email: mbishop@evequefou.be