idnits 2.17.1 draft-ietf-quic-http-27.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 1526 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) ** Obsolete normative reference: RFC 7540 (ref. 'HTTP2') (Obsoleted by RFC 9113) == Outdated reference: A later version (-21) exists of draft-ietf-quic-qpack-14 == Outdated reference: A later version (-34) exists of draft-ietf-quic-transport-27 ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) ** Obsolete normative reference: RFC 7231 (Obsoleted by RFC 9110) -- Duplicate reference: RFC7838, mentioned in 'RFC7838', was also mentioned in 'ALTSVC'. ** Downref: Normative reference to an Historic RFC: RFC 8164 Summary: 5 errors (**), 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-27 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-26 . . . . . . . . . . . . . . 53 134 B.2. Since draft-ietf-quic-http-25 . . . . . . . . . . . . . . 53 135 B.3. Since draft-ietf-quic-http-24 . . . . . . . . . . . . . . 54 136 B.4. Since draft-ietf-quic-http-23 . . . . . . . . . . . . . . 54 137 B.5. Since draft-ietf-quic-http-22 . . . . . . . . . . . . . . 54 138 B.6. Since draft-ietf-quic-http-21 . . . . . . . . . . . . . . 55 139 B.7. Since draft-ietf-quic-http-20 . . . . . . . . . . . . . . 55 140 B.8. Since draft-ietf-quic-http-19 . . . . . . . . . . . . . . 56 141 B.9. Since draft-ietf-quic-http-18 . . . . . . . . . . . . . . 56 142 B.10. Since draft-ietf-quic-http-17 . . . . . . . . . . . . . . 56 143 B.11. Since draft-ietf-quic-http-16 . . . . . . . . . . . . . . 57 144 B.12. Since draft-ietf-quic-http-15 . . . . . . . . . . . . . . 57 145 B.13. Since draft-ietf-quic-http-14 . . . . . . . . . . . . . . 57 146 B.14. Since draft-ietf-quic-http-13 . . . . . . . . . . . . . . 57 147 B.15. Since draft-ietf-quic-http-12 . . . . . . . . . . . . . . 58 148 B.16. Since draft-ietf-quic-http-11 . . . . . . . . . . . . . . 58 149 B.17. Since draft-ietf-quic-http-10 . . . . . . . . . . . . . . 58 150 B.18. Since draft-ietf-quic-http-09 . . . . . . . . . . . . . . 58 151 B.19. Since draft-ietf-quic-http-08 . . . . . . . . . . . . . . 59 152 B.20. Since draft-ietf-quic-http-07 . . . . . . . . . . . . . . 59 153 B.21. Since draft-ietf-quic-http-06 . . . . . . . . . . . . . . 59 154 B.22. Since draft-ietf-quic-http-05 . . . . . . . . . . . . . . 59 155 B.23. Since draft-ietf-quic-http-04 . . . . . . . . . . . . . . 59 156 B.24. Since draft-ietf-quic-http-03 . . . . . . . . . . . . . . 59 157 B.25. Since draft-ietf-quic-http-02 . . . . . . . . . . . . . . 60 158 B.26. Since draft-ietf-quic-http-01 . . . . . . . . . . . . . . 60 159 B.27. Since draft-ietf-quic-http-00 . . . . . . . . . . . . . . 60 160 B.28. Since draft-shade-quic-http2-mapping-00 . . . . . . . . . 61 161 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 61 162 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 61 164 1. Introduction 166 HTTP semantics are used for a broad range of services on the 167 Internet. These semantics have commonly been used with two different 168 TCP mappings, HTTP/1.1 and HTTP/2. HTTP/3 supports the same 169 semantics over a new transport protocol, QUIC. 171 1.1. Prior versions of HTTP 173 HTTP/1.1 is a TCP mapping which uses whitespace-delimited text fields 174 to convey HTTP messages. While these exchanges are human-readable, 175 using whitespace for message formatting leads to parsing difficulties 176 and workarounds to be tolerant of variant behavior. Because each 177 connection can transfer only a single HTTP request or response at a 178 time in each direction, multiple parallel TCP connections are often 179 used, reducing the ability of the congestion controller to accurately 180 manage traffic between endpoints. 182 HTTP/2 introduced a binary framing and multiplexing layer to improve 183 latency without modifying the transport layer. However, because the 184 parallel nature of HTTP/2's multiplexing is not visible to TCP's loss 185 recovery mechanisms, a lost or reordered packet causes all active 186 transactions to experience a stall regardless of whether that 187 transaction was impacted by the lost packet. 189 1.2. Delegation to QUIC 191 The QUIC transport protocol incorporates stream multiplexing and per- 192 stream flow control, similar to that provided by the HTTP/2 framing 193 layer. By providing reliability at the stream level and congestion 194 control across the entire connection, it has the capability to 195 improve the performance of HTTP compared to a TCP mapping. QUIC also 196 incorporates TLS 1.3 at the transport layer, offering comparable 197 security to running TLS over TCP, with the improved connection setup 198 latency of TCP Fast Open [RFC7413]. 200 This document defines a mapping of HTTP semantics over the QUIC 201 transport protocol, drawing heavily on the design of HTTP/2. While 202 delegating stream lifetime and flow control issues to QUIC, a similar 203 binary framing is used on each stream. Some HTTP/2 features are 204 subsumed by QUIC, while other features are implemented atop QUIC. 206 QUIC is described in [QUIC-TRANSPORT]. For a full description of 207 HTTP/2, see [HTTP2]. 209 2. HTTP/3 Protocol Overview 211 HTTP/3 provides a transport for HTTP semantics using the QUIC 212 transport protocol and an internal framing layer similar to HTTP/2. 214 Once a client knows that an HTTP/3 server exists at a certain 215 endpoint, it opens a QUIC connection. QUIC provides protocol 216 negotiation, stream-based multiplexing, and flow control. An HTTP/3 217 endpoint can be discovered using HTTP Alternative Services; this 218 process is described in greater detail in Section 3.2. 220 Within each stream, the basic unit of HTTP/3 communication is a frame 221 (Section 7.2). Each frame type serves a different purpose. For 222 example, HEADERS and DATA frames form the basis of HTTP requests and 223 responses (Section 4.1). 225 Multiplexing of requests is performed using the QUIC stream 226 abstraction, described in Section 2 of [QUIC-TRANSPORT]. Each 227 request-response pair consumes a single QUIC stream. Streams are 228 independent of each other, so one stream that is blocked or suffers 229 packet loss does not prevent progress on other streams. 231 Server push is an interaction mode introduced in HTTP/2 [HTTP2] which 232 permits a server to push a request-response exchange to a client in 233 anticipation of the client making the indicated request. This trades 234 off network usage against a potential latency gain. Several HTTP/3 235 frames are used to manage server push, such as PUSH_PROMISE, 236 MAX_PUSH_ID, and CANCEL_PUSH. 238 As in HTTP/2, request and response headers are compressed for 239 transmission. Because HPACK [HPACK] relies on in-order transmission 240 of compressed header blocks (a guarantee not provided by QUIC), 241 HTTP/3 replaces HPACK with QPACK [QPACK]. QPACK uses separate 242 unidirectional streams to modify and track header table state, while 243 header blocks refer to the state of the table without modifying it. 245 2.1. Document Organization 247 The following sections provide a detailed overview of the connection 248 lifecycle and key concepts: 250 * Connection Setup and Management (Section 3) covers how an HTTP/3 251 endpoint is discovered and a connection is established. 253 * HTTP Request Lifecycle (Section 4) describes how HTTP semantics 254 are expressed using frames. 256 * Connection Closure (Section 5) describes how connections are 257 terminated, either gracefully or abruptly. 259 The details of the wire protocol and interactions with the transport 260 are described in subsequent sections: 262 * Stream Mapping and Usage (Section 6) describes the way QUIC 263 streams are used. 265 * HTTP Framing Layer (Section 7) describes the frames used on most 266 streams. 268 * Error Handling (Section 8) describes how error conditions are 269 handled and expressed, either on a particular stream or for the 270 connection as a whole. 272 Additional resources are provided in the final sections: 274 * Extensions to HTTP/3 (Section 9) describes how new capabilities 275 can be added in future documents. 277 * A more detailed comparison between HTTP/2 and HTTP/3 can be found 278 in Appendix A. 280 2.2. Conventions and Terminology 282 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 283 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 284 "OPTIONAL" in this document are to be interpreted as described in BCP 285 14 [RFC2119] [RFC8174] when, and only when, they appear in all 286 capitals, as shown here. 288 Field definitions are given in Augmented Backus-Naur Form (ABNF), as 289 defined in [RFC5234]. 291 This document uses the variable-length integer encoding from 292 [QUIC-TRANSPORT]. 294 The following terms are used: 296 abort: An abrupt termination of a connection or stream, possibly due 297 to an error condition. 299 client: The endpoint that initiates an HTTP/3 connection. Clients 300 send HTTP requests and receive HTTP responses. 302 connection: A transport-layer connection between two endpoints, 303 using QUIC as the transport protocol. 305 connection error: An error that affects the entire HTTP/3 306 connection. 308 endpoint: Either the client or server of the connection. 310 frame: The smallest unit of communication on a stream in HTTP/3, 311 consisting of a header and a variable-length sequence of bytes 312 structured according to the frame type. Protocol elements called 313 "frames" exist in both this document and [QUIC-TRANSPORT]. Where 314 frames from [QUIC-TRANSPORT] are referenced, the frame name will 315 be prefaced with "QUIC." For example, "QUIC CONNECTION_CLOSE 316 frames." References without this preface refer to frames defined 317 in Section 7.2. 319 peer: An endpoint. When discussing a particular endpoint, "peer" 320 refers to the endpoint that is remote to the primary subject of 321 discussion. 323 receiver: An endpoint that is receiving frames. 325 sender: An endpoint that is transmitting frames. 327 server: The endpoint that accepts an HTTP/3 connection. Servers 328 receive HTTP requests and send HTTP responses. 330 stream: A bidirectional or unidirectional bytestream provided by the 331 QUIC transport. 333 stream error: An error on the individual HTTP/3 stream. 335 The term "payload body" is defined in Section 3.3 of [RFC7230]. 337 Finally, the terms "gateway", "intermediary", "proxy", and "tunnel" 338 are defined in Section 2.3 of [RFC7230]. Intermediaries act as both 339 client and server at different times. 341 3. Connection Setup and Management 343 3.1. Draft Version Identification 345 *RFC Editor's Note:* Please remove this section prior to 346 publication of a final version of this document. 348 HTTP/3 uses the token "h3" to identify itself in ALPN and Alt-Svc. 349 Only implementations of the final, published RFC can identify 350 themselves as "h3". Until such an RFC exists, implementations MUST 351 NOT identify themselves using this string. 353 Implementations of draft versions of the protocol MUST add the string 354 "-" and the corresponding draft number to the identifier. For 355 example, draft-ietf-quic-http-01 is identified using the string 356 "h3-01". 358 Draft versions MUST use the corresponding draft transport version as 359 their transport. For example, the application protocol defined in 360 draft-ietf-quic-http-25 uses the transport defined in draft-ietf- 361 quic-transport-25. 363 Non-compatible experiments that are based on these draft versions 364 MUST append the string "-" and an experiment name to the identifier. 365 For example, an experimental implementation based on draft-ietf-quic- 366 http-09 which reserves an extra stream for unsolicited transmission 367 of 1980s pop music might identify itself as "h3-09-rickroll". Note 368 that any label MUST conform to the "token" syntax defined in 369 Section 3.2.6 of [RFC7230]. Experimenters are encouraged to 370 coordinate their experiments on the quic@ietf.org mailing list. 372 3.2. Discovering an HTTP/3 Endpoint 374 An HTTP origin advertises the availability of an equivalent HTTP/3 375 endpoint via the Alt-Svc HTTP response header field or the HTTP/2 376 ALTSVC frame ([ALTSVC]), using the ALPN token defined in Section 3.3. 378 For example, an origin could indicate in an HTTP response that HTTP/3 379 was available on UDP port 50781 at the same hostname by including the 380 following header field: 382 Alt-Svc: h3=":50781" 384 On receipt of an Alt-Svc record indicating HTTP/3 support, a client 385 MAY attempt to establish a QUIC connection to the indicated host and 386 port and, if successful, send HTTP requests using the mapping 387 described in this document. 389 Connectivity problems (e.g. firewall blocking UDP) can result in QUIC 390 connection establishment failure, in which case the client SHOULD 391 continue using the existing connection or try another alternative 392 endpoint offered by the origin. 394 Servers MAY serve HTTP/3 on any UDP port, since an alternative always 395 includes an explicit port. 397 3.3. Connection Establishment 399 HTTP/3 relies on QUIC version 1 as the underlying transport. The use 400 of other QUIC transport versions with HTTP/3 MAY be defined by future 401 specifications. 403 QUIC version 1 uses TLS version 1.3 or greater as its handshake 404 protocol. HTTP/3 clients MUST support a mechanism to indicate the 405 target host to the server during the TLS handshake. If the server is 406 identified by a DNS name, clients MUST send the Server Name 407 Indication (SNI) [RFC6066] TLS extension unless an alternative 408 mechanism to indicate the target host is used. 410 QUIC connections are established as described in [QUIC-TRANSPORT]. 411 During connection establishment, HTTP/3 support is indicated by 412 selecting the ALPN token "h3" in the TLS handshake. Support for 413 other application-layer protocols MAY be offered in the same 414 handshake. 416 While connection-level options pertaining to the core QUIC protocol 417 are set in the initial crypto handshake, HTTP/3-specific settings are 418 conveyed in the SETTINGS frame. After the QUIC connection is 419 established, a SETTINGS frame (Section 7.2.4) MUST be sent by each 420 endpoint as the initial frame of their respective HTTP control stream 421 (see Section 6.2.1). 423 3.4. Connection Reuse 425 Once a connection exists to a server endpoint, this connection MAY be 426 reused for requests with multiple different URI authority components. 427 The client MAY send any requests for which the client considers the 428 server authoritative. 430 An authoritative HTTP/3 endpoint is typically discovered because the 431 client has received an Alt-Svc record from the request's origin which 432 nominates the endpoint as a valid HTTP Alternative Service for that 433 origin. As required by [RFC7838], clients MUST check that the 434 nominated server can present a valid certificate for the origin 435 before considering it authoritative. Clients MUST NOT assume that an 436 HTTP/3 endpoint is authoritative for other origins without an 437 explicit signal. 439 Prior to making requests for an origin whose scheme is not "https," 440 the client MUST ensure the server is willing to serve that scheme. 441 If the client intends to make requests for an origin whose scheme is 442 "http", this means that it MUST obtain a valid "http-opportunistic" 443 response for the origin as described in [RFC8164] prior to making any 444 such requests. Other schemes might define other mechanisms. 446 A server that does not wish clients to reuse connections for a 447 particular origin can indicate that it is not authoritative for a 448 request by sending a 421 (Misdirected Request) status code in 449 response to the request (see Section 9.1.2 of [HTTP2]). 451 The considerations discussed in Section 9.1 of [HTTP2] also apply to 452 the management of HTTP/3 connections. 454 4. HTTP Request Lifecycle 456 4.1. HTTP Message Exchanges 458 A client sends an HTTP request on a client-initiated bidirectional 459 QUIC stream. A client MUST send only a single request on a given 460 stream. A server sends zero or more non-final HTTP responses on the 461 same stream as the request, followed by a single final HTTP response, 462 as detailed below. 464 Pushed responses are sent on a server-initiated unidirectional QUIC 465 stream (see Section 6.2.2). A server sends zero or more non-final 466 HTTP responses, followed by a single final HTTP response, in the same 467 manner as a standard response. Push is described in more detail in 468 Section 4.4. 470 On a given stream, receipt of multiple requests or receipt of an 471 additional HTTP response following a final HTTP response MUST be 472 treated as malformed (Section 4.1.3). 474 An HTTP message (request or response) consists of: 476 1. the message header (see Section 3.2 of [RFC7230]), sent as a 477 single HEADERS frame (see Section 7.2.2), 479 2. optionally, the payload body, if present (see Section 3.3 of 480 [RFC7230]), sent as a series of DATA frames (see Section 7.2.1), 482 3. optionally, trailing headers, if present (see Section 4.1.2 of 483 [RFC7230]), sent as a single HEADERS frame. 485 Receipt of DATA and HEADERS frames in any other sequence MUST be 486 treated as a connection error of type H3_FRAME_UNEXPECTED 487 (Section 8). 489 A server MAY send one or more PUSH_PROMISE frames (see Section 7.2.5) 490 before, after, or interleaved with the frames of a response message. 491 These PUSH_PROMISE frames are not part of the response; see 492 Section 4.4 for more details. These frames are not permitted in 493 pushed responses; a pushed response which includes PUSH_PROMISE 494 frames MUST be treated as a connection error of type 495 H3_FRAME_UNEXPECTED. 497 Frames of unknown types (Section 9), including reserved frames 498 (Section 7.2.8) MAY be sent on a request or push stream before, 499 after, or interleaved with other frames described in this section. 501 The HEADERS and PUSH_PROMISE frames might reference updates to the 502 QPACK dynamic table. While these updates are not directly part of 503 the message exchange, they must be received and processed before the 504 message can be consumed. See Section 4.1.1 for more details. 506 The "chunked" transfer encoding defined in Section 4.1 of [RFC7230] 507 MUST NOT be used. 509 A response MAY consist of multiple messages when and only when one or 510 more informational responses (1xx; see Section 6.2 of [RFC7231]) 511 precede a final response to the same request. Non-final responses do 512 not contain a payload body or trailers. 514 If an endpoint receives an invalid sequence of frames on either a 515 request or a push stream, it MUST respond with a connection error of 516 type H3_FRAME_UNEXPECTED (Section 8). In particular, a DATA frame 517 before any HEADERS frame, or a HEADERS or DATA frame after the 518 trailing HEADERS frame is considered invalid. 520 An HTTP request/response exchange fully consumes a client-initiated 521 bidirectional QUIC stream. After sending a request, a client MUST 522 close the stream for sending. Unless using the CONNECT method (see 523 Section 4.2), clients MUST NOT make stream closure dependent on 524 receiving a response to their request. After sending a final 525 response, the server MUST close the stream for sending. At this 526 point, the QUIC stream is fully closed. 528 When a stream is closed, this indicates the end of an HTTP message. 529 Because some messages are large or unbounded, endpoints SHOULD begin 530 processing partial HTTP messages once enough of the message has been 531 received to make progress. If a client stream terminates without 532 enough of the HTTP message to provide a complete response, the server 533 SHOULD abort its response with the error code H3_REQUEST_INCOMPLETE. 535 A server can send a complete response prior to the client sending an 536 entire request if the response does not depend on any portion of the 537 request that has not been sent and received. When the server does 538 not need to receive the remainder of the request, it MAY abort 539 reading the request stream, send a complete response, and cleanly 540 close the sending part of the stream. The error code H3_NO_ERROR 541 SHOULD be used when requesting that the client stop sending on the 542 request stream. Clients MUST NOT discard complete responses as a 543 result of having their request terminated abruptly, though clients 544 can always discard responses at their discretion for other reasons. 545 If the server sends a partial or complete response but does not abort 546 reading, clients SHOULD continue sending the body of the request and 547 close the stream normally. 549 4.1.1. Header Formatting and Compression 551 HTTP message headers carry information as a series of key-value 552 pairs, called header fields. For a listing of registered HTTP header 553 fields, see the "Message Header Field" registry maintained at 554 https://www.iana.org/assignments/message-headers 555 (https://www.iana.org/assignments/message-headers). 557 Just as in previous versions of HTTP, header field names are strings 558 of ASCII characters that are compared in a case-insensitive fashion. 559 Properties of HTTP header field names and values are discussed in 560 more detail in Section 3.2 of [RFC7230], though the wire rendering in 561 HTTP/3 differs. As in HTTP/2, header field names MUST be converted 562 to lowercase prior to their encoding. A request or response 563 containing uppercase header field names MUST be treated as malformed 564 (Section 4.1.3). 566 Like HTTP/2, HTTP/3 does not use the Connection header field to 567 indicate connection-specific header fields; in this protocol, 568 connection-specific metadata is conveyed by other means. An endpoint 569 MUST NOT generate an HTTP/3 message containing connection-specific 570 header fields; any message containing connection-specific header 571 fields MUST be treated as malformed (Section 4.1.3). 573 The only exception to this is the TE header field, which MAY be 574 present in an HTTP/3 request; when it is, it MUST NOT contain any 575 value other than "trailers". 577 This means that an intermediary transforming an HTTP/1.x message to 578 HTTP/3 will need to remove any header fields nominated by the 579 Connection header field, along with the Connection header field 580 itself. Such intermediaries SHOULD also remove other connection- 581 specific header fields, such as Keep-Alive, Proxy-Connection, 582 Transfer-Encoding, and Upgrade, even if they are not nominated by the 583 Connection header field. 585 4.1.1.1. Pseudo-Header Fields 587 As in HTTP/2, HTTP/3 uses special pseudo-header fields beginning with 588 the ':' character (ASCII 0x3a) to convey the target URI, the method 589 of the request, and the status code for the response. 591 Pseudo-header fields are not HTTP header fields. Endpoints MUST NOT 592 generate pseudo-header fields other than those defined in this 593 document, except as negotiated via an extension; see Section 9. 595 Pseudo-header fields are only valid in the context in which they are 596 defined. Pseudo-header fields defined for requests MUST NOT appear 597 in responses; pseudo-header fields defined for responses MUST NOT 598 appear in requests. Pseudo-header fields MUST NOT appear in 599 trailers. Endpoints MUST treat a request or response that contains 600 undefined or invalid pseudo-header fields as malformed 601 (Section 4.1.3). 603 All pseudo-header fields MUST appear in the header block before 604 regular header fields. Any request or response that contains a 605 pseudo-header field that appears in a header block after a regular 606 header field MUST be treated as malformed (Section 4.1.3). 608 The following pseudo-header fields are defined for requests: 610 ":method": Contains the HTTP method ([RFC7231], Section 4) 612 ":scheme": Contains the scheme portion of the target URI ([RFC3986], 613 Section 3.1) 615 ":scheme" is not restricted to "http" and "https" schemed URIs. A 616 proxy or gateway can translate requests for non-HTTP schemes, 617 enabling the use of HTTP to interact with non-HTTP services. 619 ":authority": Contains the authority portion of the target URI 620 (Section 3.2 of [RFC3986]). The authority MUST NOT include the 621 deprecated "userinfo" subcomponent for "http" or "https" schemed 622 URIs. 624 To ensure that the HTTP/1.1 request line can be reproduced 625 accurately, this pseudo-header field MUST be omitted when 626 translating from an HTTP/1.1 request that has a request target in 627 origin or asterisk form (see Section 5.3 of [RFC7230]). Clients 628 that generate HTTP/3 requests directly SHOULD use the ":authority" 629 pseudo-header field instead of the Host header field. An 630 intermediary that converts an HTTP/3 request to HTTP/1.1 MUST 631 create a Host header field if one is not present in a request by 632 copying the value of the ":authority" pseudo-header field. 634 ":path": Contains the path and query parts of the target URI (the 635 "path-absolute" production and optionally a '?' character followed 636 by the "query" production (see Sections 3.3 and 3.4 of [RFC3986]). 637 A request in asterisk form includes the value '*' for the ":path" 638 pseudo-header field. 640 This pseudo-header field MUST NOT be empty for "http" or "https" 641 URIs; "http" or "https" URIs that do not contain a path component 642 MUST include a value of '/'. The exception to this rule is an 643 OPTIONS request for an "http" or "https" URI that does not include 644 a path component; these MUST include a ":path" pseudo-header field 645 with a value of '*' (see Section 5.3.4 of [RFC7230]). 647 All HTTP/3 requests MUST include exactly one value for the ":method", 648 ":scheme", and ":path" pseudo-header fields, unless it is a CONNECT 649 request (Section 4.2). An HTTP request that omits mandatory pseudo- 650 header fields or contains invalid values for those fields is 651 malformed (Section 4.1.3). 653 HTTP/3 does not define a way to carry the version identifier that is 654 included in the HTTP/1.1 request line. 656 For responses, a single ":status" pseudo-header field is defined that 657 carries the HTTP status code field (see Section 6 of [RFC7231]). 659 This pseudo-header field MUST be included in all responses; 660 otherwise, the response is malformed (Section 4.1.3). 662 HTTP/3 does not define a way to carry the version or reason phrase 663 that is included in an HTTP/1.1 status line. 665 4.1.1.2. Header Compression 667 HTTP/3 uses QPACK header compression as described in [QPACK], a 668 variation of HPACK which allows the flexibility to avoid header- 669 compression-induced head-of-line blocking. See that document for 670 additional details. 672 To allow for better compression efficiency, the cookie header field 673 [RFC6265] MAY be split into separate header fields, each with one or 674 more cookie-pairs, before compression. If a decompressed header list 675 contains multiple cookie header fields, these MUST be concatenated 676 before being passed into a non-HTTP/2, non-HTTP/3 context, as 677 described in Section 8.1.2.5 of [HTTP2]. 679 4.1.1.3. Header Size Constraints 681 An HTTP/3 implementation MAY impose a limit on the maximum size of 682 the message header it will accept on an individual HTTP message. A 683 server that receives a larger header field list than it is willing to 684 handle can send an HTTP 431 (Request Header Fields Too Large) status 685 code [RFC6585]. A client can discard responses that it cannot 686 process. The size of a header field list is calculated based on the 687 uncompressed size of header fields, including the length of the name 688 and value in bytes plus an overhead of 32 bytes for each header 689 field. 691 If an implementation wishes to advise its peer of this limit, it can 692 be conveyed as a number of bytes in the 693 "SETTINGS_MAX_HEADER_LIST_SIZE" parameter. An implementation which 694 has received this parameter SHOULD NOT send an HTTP message header 695 which exceeds the indicated size, as the peer will likely refuse to 696 process it. However, because this limit is applied at each hop, 697 messages below this limit are not guaranteed to be accepted. 699 4.1.2. Request Cancellation and Rejection 701 Clients can cancel requests by resetting and aborting the request 702 stream with an error code of H3_REQUEST_CANCELLED (Section 8.1). 703 When the client aborts reading a response, it indicates that this 704 response is no longer of interest. Implementations SHOULD cancel 705 requests by abruptly terminating any directions of a stream that are 706 still open. 708 When the server rejects a request without performing any application 709 processing, it SHOULD abort its response stream with the error code 710 H3_REQUEST_REJECTED. In this context, "processed" means that some 711 data from the stream was passed to some higher layer of software that 712 might have taken some action as a result. The client can treat 713 requests rejected by the server as though they had never been sent at 714 all, thereby allowing them to be retried later on a new connection. 715 Servers MUST NOT use the H3_REQUEST_REJECTED error code for requests 716 which were partially or fully processed. When a server abandons a 717 response after partial processing, it SHOULD abort its response 718 stream with the error code H3_REQUEST_CANCELLED. 720 When a client resets a request with the error code 721 H3_REQUEST_CANCELLED, a server MAY abruptly terminate the response 722 using the error code H3_REQUEST_REJECTED if no processing was 723 performed. Clients MUST NOT use the H3_REQUEST_REJECTED error code, 724 except when a server has requested closure of the request stream with 725 this error code. 727 If a stream is cancelled after receiving a complete response, the 728 client MAY ignore the cancellation and use the response. However, if 729 a stream is cancelled after receiving a partial response, the 730 response SHOULD NOT be used. Automatically retrying such requests is 731 not possible, unless this is otherwise permitted (e.g., idempotent 732 actions like GET, PUT, or DELETE). 734 4.1.3. Malformed Requests and Responses 736 A malformed request or response is one that is an otherwise valid 737 sequence of frames but is invalid due to: 739 * the presence of prohibited header fields or pseudo-header fields, 741 * the absence of mandatory pseudo-header fields, 743 * invalid values for pseudo-header fields, 745 * pseudo-header fields after header fields, 747 * an invalid sequence of HTTP messages, or 749 * the inclusion of uppercase header field names. 751 A request or response that includes a payload body can include a 752 "content-length" header field. A request or response is also 753 malformed if the value of a content-length header field does not 754 equal the sum of the DATA frame payload lengths that form the body. 755 A response that is defined to have no payload, as described in 756 Section 3.3.2 of [RFC7230] can have a non-zero content-length header 757 field, even though no content is included in DATA frames. 759 Intermediaries that process HTTP requests or responses (i.e., any 760 intermediary not acting as a tunnel) MUST NOT forward a malformed 761 request or response. Malformed requests or responses that are 762 detected MUST be treated as a stream error (Section 8) of type 763 H3_GENERAL_PROTOCOL_ERROR. 765 For malformed requests, a server MAY send an HTTP response prior to 766 closing or resetting the stream. Clients MUST NOT accept a malformed 767 response. Note that these requirements are intended to protect 768 against several types of common attacks against HTTP; they are 769 deliberately strict because being permissive can expose 770 implementations to these vulnerabilities. 772 4.2. The CONNECT Method 774 The pseudo-method CONNECT (Section 4.3.6 of [RFC7231]) is primarily 775 used with HTTP proxies to establish a TLS session with an origin 776 server for the purposes of interacting with "https" resources. In 777 HTTP/1.x, CONNECT is used to convert an entire HTTP connection into a 778 tunnel to a remote host. In HTTP/2, the CONNECT method is used to 779 establish a tunnel over a single HTTP/2 stream to a remote host for 780 similar purposes. 782 A CONNECT request in HTTP/3 functions in the same manner as in 783 HTTP/2. The request MUST be formatted as described in Section 8.3 of 784 [HTTP2]. A CONNECT request that does not conform to these 785 restrictions is malformed (see Section 4.1.3). The request stream 786 MUST NOT be closed at the end of the request. 788 A proxy that supports CONNECT establishes a TCP connection 789 ([RFC0793]) to the server identified in the ":authority" pseudo- 790 header field. Once this connection is successfully established, the 791 proxy sends a HEADERS frame containing a 2xx series status code to 792 the client, as defined in Section 4.3.6 of [RFC7231]. 794 All DATA frames on the stream correspond to data sent or received on 795 the TCP connection. Any DATA frame sent by the client is transmitted 796 by the proxy to the TCP server; data received from the TCP server is 797 packaged into DATA frames by the proxy. Note that the size and 798 number of TCP segments is not guaranteed to map predictably to the 799 size and number of HTTP DATA or QUIC STREAM frames. 801 Once the CONNECT method has completed, only DATA frames are permitted 802 to be sent on the stream. Extension frames MAY be used if 803 specifically permitted by the definition of the extension. Receipt 804 of any other frame type MUST be treated as a connection error of type 805 H3_FRAME_UNEXPECTED. 807 The TCP connection can be closed by either peer. When the client 808 ends the request stream (that is, the receive stream at the proxy 809 enters the "Data Recvd" state), the proxy will set the FIN bit on its 810 connection to the TCP server. When the proxy receives a packet with 811 the FIN bit set, it will terminate the send stream that it sends to 812 the client. TCP connections which remain half-closed in a single 813 direction are not invalid, but are often handled poorly by servers, 814 so clients SHOULD NOT close a stream for sending while they still 815 expect to receive data from the target of the CONNECT. 817 A TCP connection error is signaled by abruptly terminating the 818 stream. A proxy treats any error in the TCP connection, which 819 includes receiving a TCP segment with the RST bit set, as a stream 820 error of type H3_CONNECT_ERROR (Section 8.1). Correspondingly, if a 821 proxy detects an error with the stream or the QUIC connection, it 822 MUST close the TCP connection. If the underlying TCP implementation 823 permits it, the proxy SHOULD send a TCP segment with the RST bit set. 825 4.3. HTTP Upgrade 827 HTTP/3 does not support the HTTP Upgrade mechanism (Section 6.7 of 828 [RFC7230]) or 101 (Switching Protocols) informational status code 829 (Section 6.2.2 of [RFC7231]). 831 4.4. Server Push 833 Server push is an interaction mode introduced in HTTP/2 [HTTP2] which 834 permits a server to push a request-response exchange to a client in 835 anticipation of the client making the indicated request. This trades 836 off network usage against a potential latency gain. HTTP/3 server 837 push is similar to what is described in HTTP/2 [HTTP2], but uses 838 different mechanisms. 840 Each server push is identified by a unique Push ID. This Push ID is 841 used in one or more PUSH_PROMISE frames (see Section 7.2.5) that 842 carry the request headers, then included with the push stream which 843 ultimately fulfills those promises. When the same Push ID is 844 promised on multiple request streams, the decompressed request header 845 sets MUST contain the same fields in the same order, and both the 846 name and the value in each field MUST be exact matches. 848 Server push is only enabled on a connection when a client sends a 849 MAX_PUSH_ID frame (see Section 7.2.7). A server cannot use server 850 push until it receives a MAX_PUSH_ID frame. A client sends 851 additional MAX_PUSH_ID frames to control the number of pushes that a 852 server can promise. A server SHOULD use Push IDs sequentially, 853 starting at 0. A client MUST treat receipt of a push stream with a 854 Push ID that is greater than the maximum Push ID as a connection 855 error of type H3_ID_ERROR. 857 The header of the request message is carried by a PUSH_PROMISE frame 858 (see Section 7.2.5) on the request stream which generated the push. 859 Promised requests MUST conform to the requirements in Section 8.2 of 860 [HTTP2]. 862 Each pushed response is associated with one or more client requests. 863 The push is associated with the request stream on which the 864 PUSH_PROMISE frame was received. The same server push can be 865 associated with additional client requests using a PUSH_PROMISE frame 866 with the same Push ID on multiple request streams. These 867 associations do not affect the operation of the protocol, but MAY be 868 considered by user agents when deciding how to use pushed resources. 870 Ordering of a PUSH_PROMISE in relation to certain parts of the 871 response is important. The server SHOULD send PUSH_PROMISE frames 872 prior to sending HEADERS or DATA frames that reference the promised 873 responses. This reduces the chance that a client requests a resource 874 that will be pushed by the server. 876 When a server later fulfills a promise, the server push response is 877 conveyed on a push stream (see Section 6.2.2). The push stream 878 identifies the Push ID of the promise that it fulfills, then contains 879 a response to the promised request using the same format described 880 for responses in Section 4.1. 882 Due to reordering, push stream data can arrive before the 883 corresponding PUSH_PROMISE frame. When a client receives a new push 884 stream with an as-yet-unknown Push ID, both the associated client 885 request and the pushed request headers are unknown. The client can 886 buffer the stream data in expectation of the matching PUSH_PROMISE. 887 The client can use stream flow control (see section 4.1 of 888 [QUIC-TRANSPORT]) to limit the amount of data a server may commit to 889 the pushed stream. 891 If a promised server push is not needed by the client, the client 892 SHOULD send a CANCEL_PUSH frame. If the push stream is already open 893 or opens after sending the CANCEL_PUSH frame, the client can abort 894 reading the stream with an error code of H3_REQUEST_CANCELLED. This 895 asks the server not to transfer additional data and indicates that it 896 will be discarded upon receipt. 898 5. Connection Closure 900 Once established, an HTTP/3 connection can be used for many requests 901 and responses over time until the connection is closed. Connection 902 closure can happen in any of several different ways. 904 5.1. Idle Connections 906 Each QUIC endpoint declares an idle timeout during the handshake. If 907 the connection remains idle (no packets received) for longer than 908 this duration, the peer will assume that the connection has been 909 closed. HTTP/3 implementations will need to open a new connection 910 for new requests if the existing connection has been idle for longer 911 than the server's advertised idle timeout, and SHOULD do so if 912 approaching the idle timeout. 914 HTTP clients are expected to request that the transport keep 915 connections open while there are responses outstanding for requests 916 or server pushes, as described in Section 19.2 of [QUIC-TRANSPORT]. 917 If the client is not expecting a response from the server, allowing 918 an idle connection to time out is preferred over expending effort 919 maintaining a connection that might not be needed. A gateway MAY 920 maintain connections in anticipation of need rather than incur the 921 latency cost of connection establishment to servers. Servers SHOULD 922 NOT actively keep connections open. 924 5.2. Connection Shutdown 926 Even when a connection is not idle, either endpoint can decide to 927 stop using the connection and let the connection close gracefully. 928 Since clients drive request generation, clients perform a connection 929 shutdown by not sending additional requests on the connection; 930 responses and pushed responses associated to previous requests will 931 continue to completion. Servers perform the same function by 932 communicating with clients. 934 Servers initiate the shutdown of a connection by sending a GOAWAY 935 frame (Section 7.2.6). The GOAWAY frame indicates that client- 936 initiated requests on lower stream IDs were or might be processed in 937 this connection, while requests on the indicated stream ID and 938 greater were rejected. This enables client and server to agree on 939 which requests were accepted prior to the connection shutdown. This 940 identifier MAY be zero if no requests were processed. Servers SHOULD 941 NOT permit additional QUIC streams after sending a GOAWAY frame. 943 Clients MUST NOT send new requests on the connection after receiving 944 GOAWAY; a new connection MAY be established to send additional 945 requests. 947 Some requests might already be in transit. If the client has already 948 sent requests on streams with a Stream ID greater than or equal to 949 that indicated in the GOAWAY frame, those requests will not be 950 processed and MAY be retried by the client on a different connection. 951 The client MAY cancel these requests. It is RECOMMENDED that the 952 server explicitly reject such requests (see Section 4.1.2) in order 953 to clean up transport state for the affected streams. 955 Requests on Stream IDs less than the Stream ID in the GOAWAY frame 956 might have been processed; their status cannot be known until a 957 response is received, the stream is reset individually, or the 958 connection terminates. Servers MAY reject individual requests on 959 streams below the indicated ID if these requests were not processed. 961 Servers SHOULD send a GOAWAY frame when the closing of a connection 962 is known in advance, even if the advance notice is small, so that the 963 remote peer can know whether a request has been partially processed 964 or not. For example, if an HTTP client sends a POST at the same time 965 that a server closes a QUIC connection, the client cannot know if the 966 server started to process that POST request if the server does not 967 send a GOAWAY frame to indicate what streams it might have acted on. 969 A client that is unable to retry requests loses all requests that are 970 in flight when the server closes the connection. A server MAY send 971 multiple GOAWAY frames indicating different stream IDs, but MUST NOT 972 increase the value they send in the last Stream ID, since clients 973 might already have retried unprocessed requests on another 974 connection. 976 A server that is attempting to gracefully shut down a connection can 977 send an initial GOAWAY frame with the last Stream ID set to the 978 maximum possible value for a client-initiated, bidirectional stream 979 (i.e. 2^62-4 in case of QUIC version 1). This GOAWAY frame signals 980 to the client that shutdown is imminent and that initiating further 981 requests is prohibited. After allowing time for any in-flight 982 requests to reach the server, the server can send another GOAWAY 983 frame indicating which requests it will accept before the end of the 984 connection. This ensures that a connection can be cleanly shut down 985 without causing requests to fail. 987 Once all accepted requests have been processed, the server can permit 988 the connection to become idle, or MAY initiate an immediate closure 989 of the connection. An endpoint that completes a graceful shutdown 990 SHOULD use the H3_NO_ERROR code when closing the connection. 992 If a client has consumed all available bidirectional stream IDs with 993 requests, the server need not send a GOAWAY frame, since the client 994 is unable to make further requests. 996 5.3. Immediate Application Closure 998 An HTTP/3 implementation can immediately close the QUIC connection at 999 any time. This results in sending a QUIC CONNECTION_CLOSE frame to 1000 the peer indicating that the application layer has terminated the 1001 connection. The application error code in this frame indicates to 1002 the peer why the connection is being closed. See Section 8 for error 1003 codes which can be used when closing a connection in HTTP/3. 1005 Before closing the connection, a GOAWAY MAY be sent to allow the 1006 client to retry some requests. Including the GOAWAY frame in the 1007 same packet as the QUIC CONNECTION_CLOSE frame improves the chances 1008 of the frame being received by clients. 1010 5.4. Transport Closure 1012 For various reasons, the QUIC transport could indicate to the 1013 application layer that the connection has terminated. This might be 1014 due to an explicit closure by the peer, a transport-level error, or a 1015 change in network topology which interrupts connectivity. 1017 If a connection terminates without a GOAWAY frame, clients MUST 1018 assume that any request which was sent, whether in whole or in part, 1019 might have been processed. 1021 6. Stream Mapping and Usage 1023 A QUIC stream provides reliable in-order delivery of bytes, but makes 1024 no guarantees about order of delivery with regard to bytes on other 1025 streams. On the wire, data is framed into QUIC STREAM frames, but 1026 this framing is invisible to the HTTP framing layer. The transport 1027 layer buffers and orders received QUIC STREAM frames, exposing the 1028 data contained within as a reliable byte stream to the application. 1029 Although QUIC permits out-of-order delivery within a stream, HTTP/3 1030 does not make use of this feature. 1032 QUIC streams can be either unidirectional, carrying data only from 1033 initiator to receiver, or bidirectional. Streams can be initiated by 1034 either the client or the server. For more detail on QUIC streams, 1035 see Section 2 of [QUIC-TRANSPORT]. 1037 When HTTP headers and data are sent over QUIC, the QUIC layer handles 1038 most of the stream management. HTTP does not need to do any separate 1039 multiplexing when using QUIC - data sent over a QUIC stream always 1040 maps to a particular HTTP transaction or connection context. 1042 6.1. Bidirectional Streams 1044 All client-initiated bidirectional streams are used for HTTP requests 1045 and responses. A bidirectional stream ensures that the response can 1046 be readily correlated with the request. This means that the client's 1047 first request occurs on QUIC stream 0, with subsequent requests on 1048 stream 4, 8, and so on. In order to permit these streams to open, an 1049 HTTP/3 server SHOULD configure non-zero minimum values for the number 1050 of permitted streams and the initial stream flow control window. So 1051 as to not unnecessarily limit parallelism, at least 100 requests 1052 SHOULD be permitted at a time. 1054 HTTP/3 does not use server-initiated bidirectional streams, though an 1055 extension could define a use for these streams. Clients MUST treat 1056 receipt of a server-initiated bidirectional stream as a connection 1057 error of type H3_STREAM_CREATION_ERROR unless such an extension has 1058 been negotiated. 1060 6.2. Unidirectional Streams 1062 Unidirectional streams, in either direction, are used for a range of 1063 purposes. The purpose is indicated by a stream type, which is sent 1064 as a variable-length integer at the start of the stream. The format 1065 and structure of data that follows this integer is determined by the 1066 stream type. 1068 0 1 2 3 1069 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 1070 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1071 | Stream Type (i) ... 1072 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1074 Figure 1: Unidirectional Stream Header 1076 Some stream types are reserved (Section 6.2.3). Two stream types are 1077 defined in this document: control streams (Section 6.2.1) and push 1078 streams (Section 6.2.2). [QPACK] defines two additional stream 1079 types. Other stream types can be defined by extensions to HTTP/3; 1080 see Section 9 for more details. 1082 The performance of HTTP/3 connections in the early phase of their 1083 lifetime is sensitive to the creation and exchange of data on 1084 unidirectional streams. Endpoints that excessively restrict the 1085 number of streams or the flow control window of these streams will 1086 increase the chance that the remote peer reaches the limit early and 1087 becomes blocked. In particular, implementations should consider that 1088 remote peers may wish to exercise reserved stream behavior 1089 (Section 6.2.3) with some of the unidirectional streams they are 1090 permitted to use. To avoid blocking, the transport parameters sent 1091 by both clients and servers MUST allow the peer to create at least 1092 one unidirectional stream for the HTTP control stream plus the number 1093 of unidirectional streams required by mandatory extensions (three 1094 being the minimum number required for the base HTTP/3 protocol and 1095 QPACK), and SHOULD provide at least 1,024 bytes of flow control 1096 credit to each stream. 1098 Note that an endpoint is not required to grant additional credits to 1099 create more unidirectional streams if its peer consumes all the 1100 initial credits before creating the critical unidirectional streams. 1101 Endpoints SHOULD create the HTTP control stream as well as the 1102 unidirectional streams required by mandatory extensions (such as the 1103 QPACK encoder and decoder streams) first, and then create additional 1104 streams as allowed by their peer. 1106 If the stream header indicates a stream type which is not supported 1107 by the recipient, the remainder of the stream cannot be consumed as 1108 the semantics are unknown. Recipients of unknown stream types MAY 1109 abort reading of the stream with an error code of 1110 H3_STREAM_CREATION_ERROR, but MUST NOT consider such streams to be a 1111 connection error of any kind. 1113 Implementations MAY send stream types before knowing whether the peer 1114 supports them. However, stream types which could modify the state or 1115 semantics of existing protocol components, including QPACK or other 1116 extensions, MUST NOT be sent until the peer is known to support them. 1118 A sender can close or reset a unidirectional stream unless otherwise 1119 specified. A receiver MUST tolerate unidirectional streams being 1120 closed or reset prior to the reception of the unidirectional stream 1121 header. 1123 6.2.1. Control Streams 1125 A control stream is indicated by a stream type of "0x00". Data on 1126 this stream consists of HTTP/3 frames, as defined in Section 7.2. 1128 Each side MUST initiate a single control stream at the beginning of 1129 the connection and send its SETTINGS frame as the first frame on this 1130 stream. If the first frame of the control stream is any other frame 1131 type, this MUST be treated as a connection error of type 1132 H3_MISSING_SETTINGS. Only one control stream per peer is permitted; 1133 receipt of a second stream which claims to be a control stream MUST 1134 be treated as a connection error of type H3_STREAM_CREATION_ERROR. 1135 The sender MUST NOT close the control stream, and the receiver MUST 1136 NOT request that the sender close the control stream. If either 1137 control stream is closed at any point, this MUST be treated as a 1138 connection error of type H3_CLOSED_CRITICAL_STREAM. 1140 A pair of unidirectional streams is used rather than a single 1141 bidirectional stream. This allows either peer to send data as soon 1142 as it is able. Depending on whether 0-RTT is enabled on the 1143 connection, either client or server might be able to send stream data 1144 first after the cryptographic handshake completes. 1146 6.2.2. Push Streams 1148 Server push is an optional feature introduced in HTTP/2 that allows a 1149 server to initiate a response before a request has been made. See 1150 Section 4.4 for more details. 1152 A push stream is indicated by a stream type of "0x01", followed by 1153 the Push ID of the promise that it fulfills, encoded as a variable- 1154 length integer. The remaining data on this stream consists of HTTP/3 1155 frames, as defined in Section 7.2, and fulfills a promised server 1156 push by zero or more non-final HTTP responses followed by a single 1157 final HTTP response, as defined in Section 4.1. Server push and Push 1158 IDs are described in Section 4.4. 1160 Only servers can push; if a server receives a client-initiated push 1161 stream, this MUST be treated as a connection error of type 1162 H3_STREAM_CREATION_ERROR. 1164 0 1 2 3 1165 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 1166 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1167 | 0x01 (i) ... 1168 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1169 | Push ID (i) ... 1170 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1172 Figure 2: Push Stream Header 1174 Each Push ID MUST only be used once in a push stream header. If a 1175 push stream header includes a Push ID that was used in another push 1176 stream header, the client MUST treat this as a connection error of 1177 type H3_ID_ERROR. 1179 6.2.3. Reserved Stream Types 1181 Stream types of the format "0x1f * N + 0x21" for integer values of N 1182 are reserved to exercise the requirement that unknown types be 1183 ignored. These streams have no semantics, and can be sent when 1184 application-layer padding is desired. They MAY also be sent on 1185 connections where no data is currently being transferred. Endpoints 1186 MUST NOT consider these streams to have any meaning upon receipt. 1188 The payload and length of the stream are selected in any manner the 1189 implementation chooses. Implementations MAY terminate these streams 1190 cleanly, or MAY abruptly terminate them. When terminating abruptly, 1191 the error code H3_NO_ERROR or a reserved error code (Section 8.1) 1192 SHOULD be used. 1194 7. HTTP Framing Layer 1196 HTTP frames are carried on QUIC streams, as described in Section 6. 1197 HTTP/3 defines three stream types: control stream, request stream, 1198 and push stream. This section describes HTTP/3 frame formats and the 1199 streams types on which they are permitted; see Table 1 for an 1200 overview. A comparison between HTTP/2 and HTTP/3 frames is provided 1201 in Appendix A.2. 1203 +--------------+----------------+----------------+--------+---------+ 1204 | Frame | Control Stream | Request | Push | Section | 1205 | | | Stream | Stream | | 1206 +==============+================+================+========+=========+ 1207 | DATA | No | Yes | Yes | Section | 1208 | | | | | 7.2.1 | 1209 +--------------+----------------+----------------+--------+---------+ 1210 | HEADERS | No | Yes | Yes | Section | 1211 | | | | | 7.2.2 | 1212 +--------------+----------------+----------------+--------+---------+ 1213 | CANCEL_PUSH | Yes | No | No | Section | 1214 | | | | | 7.2.3 | 1215 +--------------+----------------+----------------+--------+---------+ 1216 | SETTINGS | Yes (1) | No | No | Section | 1217 | | | | | 7.2.4 | 1218 +--------------+----------------+----------------+--------+---------+ 1219 | PUSH_PROMISE | No | Yes | No | Section | 1220 | | | | | 7.2.5 | 1221 +--------------+----------------+----------------+--------+---------+ 1222 | GOAWAY | Yes | No | No | Section | 1223 | | | | | 7.2.6 | 1224 +--------------+----------------+----------------+--------+---------+ 1225 | MAX_PUSH_ID | Yes | No | No | Section | 1226 | | | | | 7.2.7 | 1227 +--------------+----------------+----------------+--------+---------+ 1228 | Reserved | Yes | Yes | Yes | Section | 1229 | | | | | 7.2.8 | 1230 +--------------+----------------+----------------+--------+---------+ 1232 Table 1: HTTP/3 Frames and Stream Type Overview 1234 Certain frames can only occur as the first frame of a particular 1235 stream type; these are indicated in Table 1 with a (1). Specific 1236 guidance is provided in the relevant section. 1238 Note that, unlike QUIC frames, HTTP/3 frames can span multiple 1239 packets. 1241 7.1. Frame Layout 1243 All frames have the following format: 1245 0 1 2 3 1246 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 1247 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1248 | Type (i) ... 1249 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1250 | Length (i) ... 1251 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1252 | Frame Payload (*) ... 1253 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1255 Figure 3: HTTP/3 Frame Format 1257 A frame includes the following fields: 1259 Type: A variable-length integer that identifies the frame type. 1261 Length: A variable-length integer that describes the length in bytes 1262 of the Frame Payload. 1264 Frame Payload: A payload, the semantics of which are determined by 1265 the Type field. 1267 Each frame's payload MUST contain exactly the fields identified in 1268 its description. A frame payload that contains additional bytes 1269 after the identified fields or a frame payload that terminates before 1270 the end of the identified fields MUST be treated as a connection 1271 error of type H3_FRAME_ERROR. 1273 When a stream terminates cleanly, if the last frame on the stream was 1274 truncated, this MUST be treated as a connection error (Section 8) of 1275 type H3_FRAME_ERROR. Streams which terminate abruptly may be reset 1276 at any point in a frame. 1278 7.2. Frame Definitions 1280 7.2.1. DATA 1282 DATA frames (type=0x0) convey arbitrary, variable-length sequences of 1283 bytes associated with an HTTP request or response payload. 1285 DATA frames MUST be associated with an HTTP request or response. If 1286 a DATA frame is received on a control stream, the recipient MUST 1287 respond with a connection error (Section 8) of type 1288 H3_FRAME_UNEXPECTED. 1290 0 1 2 3 1291 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 1292 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1293 | Payload (*) ... 1294 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1296 Figure 4: DATA Frame Payload 1298 7.2.2. HEADERS 1300 The HEADERS frame (type=0x1) is used to carry a header block, 1301 compressed using QPACK. See [QPACK] for more details. 1303 0 1 2 3 1304 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 1305 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1306 | Header Block (*) ... 1307 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1309 Figure 5: HEADERS Frame Payload 1311 HEADERS frames can only be sent on request / push streams. If a 1312 HEADERS frame is received on a control stream, the recipient MUST 1313 respond with a connection error (Section 8) of type 1314 H3_FRAME_UNEXPECTED. 1316 7.2.3. CANCEL_PUSH 1318 The CANCEL_PUSH frame (type=0x3) is used to request cancellation of a 1319 server push prior to the push stream being received. The CANCEL_PUSH 1320 frame identifies a server push by Push ID (see Section 7.2.5), 1321 encoded as a variable-length integer. 1323 When a client sends CANCEL_PUSH, it is indicating that it does not 1324 wish to receive the promised resource. The server SHOULD abort 1325 sending the resource, but the mechanism to do so depends on the state 1326 of the corresponding push stream. If the server has not yet created 1327 a push stream, it does not create one. If the push stream is open, 1328 the server SHOULD abruptly terminate that stream. If the push stream 1329 has already ended, the server MAY still abruptly terminate the stream 1330 or MAY take no action. 1332 When a server sends CANCEL_PUSH, it is indicating that it will not be 1333 fulfilling a promise and has not created a push stream. The client 1334 should not expect the corresponding promise to be fulfilled. 1336 Sending CANCEL_PUSH has no direct effect on the state of existing 1337 push streams. A server SHOULD NOT send a CANCEL_PUSH when it has 1338 already created a corresponding push stream, and a client SHOULD NOT 1339 send a CANCEL_PUSH when it has already received a corresponding push 1340 stream. 1342 A CANCEL_PUSH frame is sent on the control stream. Receiving a 1343 CANCEL_PUSH frame on a stream other than the control stream MUST be 1344 treated as a connection error of type H3_FRAME_UNEXPECTED. 1346 0 1 2 3 1347 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 1348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1349 | Push ID (i) ... 1350 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1352 Figure 6: CANCEL_PUSH Frame Payload 1354 The CANCEL_PUSH frame carries a Push ID encoded as a variable-length 1355 integer. The Push ID identifies the server push that is being 1356 cancelled (see Section 7.2.5). If a CANCEL_PUSH frame is received 1357 which references a Push ID greater than currently allowed on the 1358 connection, this MUST be treated as a connection error of type 1359 H3_ID_ERROR. 1361 If the client receives a CANCEL_PUSH frame, that frame might identify 1362 a Push ID that has not yet been mentioned by a PUSH_PROMISE frame due 1363 to reordering. If a server receives a CANCEL_PUSH frame for a Push 1364 ID that has not yet been mentioned by a PUSH_PROMISE frame, this MUST 1365 be treated as a connection error of type H3_ID_ERROR. 1367 7.2.4. SETTINGS 1369 The SETTINGS frame (type=0x4) conveys configuration parameters that 1370 affect how endpoints communicate, such as preferences and constraints 1371 on peer behavior. Individually, a SETTINGS parameter can also be 1372 referred to as a "setting"; the identifier and value of each setting 1373 parameter can be referred to as a "setting identifier" and a "setting 1374 value". 1376 SETTINGS frames always apply to a connection, never a single stream. 1377 A SETTINGS frame MUST be sent as the first frame of each control 1378 stream (see Section 6.2.1) by each peer, and MUST NOT be sent 1379 subsequently. If an endpoint receives a second SETTINGS frame on the 1380 control stream, the endpoint MUST respond with a connection error of 1381 type H3_FRAME_UNEXPECTED. 1383 SETTINGS frames MUST NOT be sent on any stream other than the control 1384 stream. If an endpoint receives a SETTINGS frame on a different 1385 stream, the endpoint MUST respond with a connection error of type 1386 H3_FRAME_UNEXPECTED. 1388 SETTINGS parameters are not negotiated; they describe characteristics 1389 of the sending peer, which can be used by the receiving peer. 1390 However, a negotiation can be implied by the use of SETTINGS - each 1391 peer uses SETTINGS to advertise a set of supported values. The 1392 definition of the setting would describe how each peer combines the 1393 two sets to conclude which choice will be used. SETTINGS does not 1394 provide a mechanism to identify when the choice takes effect. 1396 Different values for the same parameter can be advertised by each 1397 peer. For example, a client might be willing to consume a very large 1398 response header, while servers are more cautious about request size. 1400 The same setting identifier MUST NOT occur more than once in the 1401 SETTINGS frame. A receiver MAY treat the presence of duplicate 1402 setting identifiers as a connection error of type H3_SETTINGS_ERROR. 1404 The payload of a SETTINGS frame consists of zero or more parameters. 1405 Each parameter consists of a setting identifier and a value, both 1406 encoded as QUIC variable-length integers. 1408 0 1 2 3 1409 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 1410 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1411 | Identifier (i) ... 1412 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1413 | Value (i) ... 1414 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1416 Figure 7: SETTINGS Parameter Format 1418 An implementation MUST ignore the contents for any SETTINGS 1419 identifier it does not understand. 1421 7.2.4.1. Defined SETTINGS Parameters 1423 The following settings are defined in HTTP/3: 1425 SETTINGS_MAX_HEADER_LIST_SIZE (0x6): The default value is unlimited. 1426 See Section 4.1.1 for usage. 1428 Setting identifiers of the format "0x1f * N + 0x21" for integer 1429 values of N are reserved to exercise the requirement that unknown 1430 identifiers be ignored. Such settings have no defined meaning. 1431 Endpoints SHOULD include at least one such setting in their SETTINGS 1432 frame. Endpoints MUST NOT consider such settings to have any meaning 1433 upon receipt. 1435 Because the setting has no defined meaning, the value of the setting 1436 can be any value the implementation selects. 1438 Additional settings can be defined by extensions to HTTP/3; see 1439 Section 9 for more details. 1441 7.2.4.2. Initialization 1443 An HTTP implementation MUST NOT send frames or requests which would 1444 be invalid based on its current understanding of the peer's settings. 1446 All settings begin at an initial value. Each endpoint SHOULD use 1447 these initial values to send messages before the peer's SETTINGS 1448 frame has arrived, as packets carrying the settings can be lost or 1449 delayed. When the SETTINGS frame arrives, any settings are changed 1450 to their new values. 1452 This removes the need to wait for the SETTINGS frame before sending 1453 messages. Endpoints MUST NOT require any data to be received from 1454 the peer prior to sending the SETTINGS frame; settings MUST be sent 1455 as soon as the transport is ready to send data. 1457 For servers, the initial value of each client setting is the default 1458 value. 1460 For clients using a 1-RTT QUIC connection, the initial value of each 1461 server setting is the default value. 1-RTT keys will always become 1462 available prior to SETTINGS arriving, even if the server sends 1463 SETTINGS immediately. Clients SHOULD NOT wait indefinitely for 1464 SETTINGS to arrive before sending requests, but SHOULD process 1465 received datagrams in order to increase the likelihood of processing 1466 SETTINGS before sending the first request. 1468 When a 0-RTT QUIC connection is being used, the initial value of each 1469 server setting is the value used in the previous session. Clients 1470 SHOULD store the settings the server provided in the connection where 1471 resumption information was provided, but MAY opt not to store 1472 settings in certain cases (e.g., if the session ticket is received 1473 before the SETTINGS frame). A client MUST comply with stored 1474 settings - or default values, if no values are stored - when 1475 attempting 0-RTT. Once a server has provided new settings, clients 1476 MUST comply with those values. 1478 A server can remember the settings that it advertised, or store an 1479 integrity-protected copy of the values in the ticket and recover the 1480 information when accepting 0-RTT data. A server uses the HTTP/3 1481 settings values in determining whether to accept 0-RTT data. If the 1482 server cannot determine that the settings remembered by a client are 1483 compatible with its current settings, it MUST NOT accept 0-RTT data. 1484 Remembered settings are compatible if a client complying with those 1485 settings would not violate the server's current settings. 1487 A server MAY accept 0-RTT and subsequently provide different settings 1488 in its SETTINGS frame. If 0-RTT data is accepted by the server, its 1489 SETTINGS frame MUST NOT reduce any limits or alter any values that 1490 might be violated by the client with its 0-RTT data. The server MUST 1491 include all settings which differ from their default values. If a 1492 server accepts 0-RTT but then sends settings that are not compatible 1493 with the previously specified settings, this MUST be treated as a 1494 connection error of type H3_SETTINGS_ERROR. If a server accepts 1495 0-RTT but then sends a SETTINGS frame that omits a setting value that 1496 the client understands (apart from reserved setting identifiers) that 1497 was previously specified to have a non-default value, this MUST be 1498 treated as a connection error of type H3_SETTINGS_ERROR. 1500 7.2.5. PUSH_PROMISE 1502 The PUSH_PROMISE frame (type=0x5) is used to carry a promised request 1503 header set from server to client on a request stream, as in HTTP/2. 1505 0 1 2 3 1506 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 1507 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1508 | Push ID (i) ... 1509 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1510 | Header Block (*) ... 1511 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1513 Figure 8: PUSH_PROMISE Frame Payload 1515 The payload consists of: 1517 Push ID: A variable-length integer that identifies the server push 1518 operation. A Push ID is used in push stream headers 1519 (Section 4.4), CANCEL_PUSH frames (Section 7.2.3). 1521 Header Block: QPACK-compressed request header fields for the 1522 promised response. See [QPACK] for more details. 1524 A server MUST NOT use a Push ID that is larger than the client has 1525 provided in a MAX_PUSH_ID frame (Section 7.2.7). A client MUST treat 1526 receipt of a PUSH_PROMISE frame that contains a larger Push ID than 1527 the client has advertised as a connection error of H3_ID_ERROR. 1529 A server MAY use the same Push ID in multiple PUSH_PROMISE frames. 1530 If so, the decompressed request header sets MUST contain the same 1531 fields in the same order, and both the name and and value in each 1532 field MUST be exact matches. Clients SHOULD compare the request 1533 header sets for resources promised multiple times. If a client 1534 receives a Push ID that has already been promised and detects a 1535 mismatch, it MUST respond with a connection error of type 1536 H3_GENERAL_PROTOCOL_ERROR. If the decompressed header sets match 1537 exactly, the client SHOULD associate the pushed content with each 1538 stream on which a PUSH_PROMISE was received. 1540 Allowing duplicate references to the same Push ID is primarily to 1541 reduce duplication caused by concurrent requests. A server SHOULD 1542 avoid reusing a Push ID over a long period. Clients are likely to 1543 consume server push responses and not retain them for reuse over 1544 time. Clients that see a PUSH_PROMISE that uses a Push ID that they 1545 have already consumed and discarded are forced to ignore the 1546 PUSH_PROMISE. 1548 If a PUSH_PROMISE frame is received on the control stream, the client 1549 MUST respond with a connection error (Section 8) of type 1550 H3_FRAME_UNEXPECTED. 1552 A client MUST NOT send a PUSH_PROMISE frame. A server MUST treat the 1553 receipt of a PUSH_PROMISE frame as a connection error of type 1554 H3_FRAME_UNEXPECTED. 1556 See Section 4.4 for a description of the overall server push 1557 mechanism. 1559 7.2.6. GOAWAY 1561 The GOAWAY frame (type=0x7) is used to initiate graceful shutdown of 1562 a connection by a server. GOAWAY allows a server to stop accepting 1563 new requests while still finishing processing of previously received 1564 requests. This enables administrative actions, like server 1565 maintenance. GOAWAY by itself does not close a connection. 1567 0 1 2 3 1568 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 1569 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1570 | Stream ID (i) ... 1571 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1573 Figure 9: GOAWAY Frame Payload 1575 The GOAWAY frame is always sent on the control stream. It carries a 1576 QUIC Stream ID for a client-initiated bidirectional stream encoded as 1577 a variable-length integer. A client MUST treat receipt of a GOAWAY 1578 frame containing a Stream ID of any other type as a connection error 1579 of type H3_ID_ERROR. 1581 Clients do not need to send GOAWAY to initiate a graceful shutdown; 1582 they simply stop making new requests. A server MUST treat receipt of 1583 a GOAWAY frame on any stream as a connection error (Section 8) of 1584 type H3_FRAME_UNEXPECTED. 1586 The GOAWAY frame applies to the connection, not a specific stream. A 1587 client MUST treat a GOAWAY frame on a stream other than the control 1588 stream as a connection error (Section 8) of type H3_FRAME_UNEXPECTED. 1590 See Section 5.2 for more information on the use of the GOAWAY frame. 1592 7.2.7. MAX_PUSH_ID 1594 The MAX_PUSH_ID frame (type=0xD) is used by clients to control the 1595 number of server pushes that the server can initiate. This sets the 1596 maximum value for a Push ID that the server can use in PUSH_PROMISE 1597 and CANCEL_PUSH frames. Consequently, this also limits the number of 1598 push streams that the server can initiate in addition to the limit 1599 maintained by the QUIC transport. 1601 The MAX_PUSH_ID frame is always sent on the control stream. Receipt 1602 of a MAX_PUSH_ID frame on any other stream MUST be treated as a 1603 connection error of type H3_FRAME_UNEXPECTED. 1605 A server MUST NOT send a MAX_PUSH_ID frame. A client MUST treat the 1606 receipt of a MAX_PUSH_ID frame as a connection error of type 1607 H3_FRAME_UNEXPECTED. 1609 The maximum Push ID is unset when a connection is created, meaning 1610 that a server cannot push until it receives a MAX_PUSH_ID frame. A 1611 client that wishes to manage the number of promised server pushes can 1612 increase the maximum Push ID by sending MAX_PUSH_ID frames as the 1613 server fulfills or cancels server pushes. 1615 0 1 2 3 1616 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 1617 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1618 | Push ID (i) ... 1619 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1621 Figure 10: MAX_PUSH_ID Frame Payload 1623 The MAX_PUSH_ID frame carries a single variable-length integer that 1624 identifies the maximum value for a Push ID that the server can use 1625 (see Section 7.2.5). A MAX_PUSH_ID frame cannot reduce the maximum 1626 Push ID; receipt of a MAX_PUSH_ID that contains a smaller value than 1627 previously received MUST be treated as a connection error of type 1628 H3_ID_ERROR. 1630 7.2.8. Reserved Frame Types 1632 Frame types of the format "0x1f * N + 0x21" for integer values of N 1633 are reserved to exercise the requirement that unknown types be 1634 ignored (Section 9). These frames have no semantics, and can be sent 1635 on any open stream when application-layer padding is desired. They 1636 MAY also be sent on connections where no data is currently being 1637 transferred. Endpoints MUST NOT consider these frames to have any 1638 meaning upon receipt. 1640 The payload and length of the frames are selected in any manner the 1641 implementation chooses. 1643 Frame types which were used in HTTP/2 where there is no corresponding 1644 HTTP/3 frame have also been reserved (Section 11.2.1). These frame 1645 types MUST NOT be sent, and receipt MAY be treated as an error of 1646 type H3_FRAME_UNEXPECTED. 1648 8. Error Handling 1650 QUIC allows the application to abruptly terminate (reset) individual 1651 streams or the entire connection when an error is encountered. These 1652 are referred to as "stream errors" or "connection errors" and are 1653 described in more detail in [QUIC-TRANSPORT]. 1655 An endpoint MAY choose to treat a stream error as a connection error 1656 under certain circumstances. Implementations need to consider the 1657 impact on outstanding requests before making this choice. 1659 Because new error codes can be defined without negotiation (see 1660 Section 9), use of an error code in an unexpected context or receipt 1661 of an unknown error code MUST be treated as equivalent to 1662 H3_NO_ERROR. However, closing a stream can have other effects 1663 regardless of the error code (see Section 4.1). 1665 This section describes HTTP/3-specific error codes which can be used 1666 to express the cause of a connection or stream error. 1668 8.1. HTTP/3 Error Codes 1670 The following error codes are defined for use when abruptly 1671 terminating streams, aborting reading of streams, or immediately 1672 closing connections. 1674 H3_NO_ERROR (0x100): No error. This is used when the connection or 1675 stream needs to be closed, but there is no error to signal. 1677 H3_GENERAL_PROTOCOL_ERROR (0x101): Peer violated protocol 1678 requirements in a way which doesn't match a more specific error 1679 code, or endpoint declines to use the more specific error code. 1681 H3_INTERNAL_ERROR (0x102): An internal error has occurred in the 1682 HTTP stack. 1684 H3_STREAM_CREATION_ERROR (0x103): The endpoint detected that its 1685 peer created a stream that it will not accept. 1687 H3_CLOSED_CRITICAL_STREAM (0x104): A stream required by the 1688 connection was closed or reset. 1690 H3_FRAME_UNEXPECTED (0x105): A frame was received which was not 1691 permitted in the current state or on the current stream. 1693 H3_FRAME_ERROR (0x106): A frame that fails to satisfy layout 1694 requirements or with an invalid size was received. 1696 H3_EXCESSIVE_LOAD (0x107): The endpoint detected that its peer is 1697 exhibiting a behavior that might be generating excessive load. 1699 H3_ID_ERROR (0x108): A Stream ID or Push ID was used incorrectly, 1700 such as exceeding a limit, reducing a limit, or being reused. 1702 H3_SETTINGS_ERROR (0x109): An endpoint detected an error in the 1703 payload of a SETTINGS frame. 1705 H3_MISSING_SETTINGS (0x10A): No SETTINGS frame was received at the 1706 beginning of the control stream. 1708 H3_REQUEST_REJECTED (0x10B): A server rejected a request without 1709 performing any application processing. 1711 H3_REQUEST_CANCELLED (0x10C): The request or its response (including 1712 pushed response) is cancelled. 1714 H3_REQUEST_INCOMPLETE (0x10D): The client's stream terminated 1715 without containing a fully-formed request. 1717 H3_CONNECT_ERROR (0x10F): The connection established in response to 1718 a CONNECT request was reset or abnormally closed. 1720 H3_VERSION_FALLBACK (0x110): The requested operation cannot be 1721 served over HTTP/3. The peer should retry over HTTP/1.1. 1723 Error codes of the format "0x1f * N + 0x21" for integer values of N 1724 are reserved to exercise the requirement that unknown error codes be 1725 treated as equivalent to H3_NO_ERROR (Section 9). Implementations 1726 SHOULD select an error code from this space with some probability 1727 when they would have sent H3_NO_ERROR. 1729 9. Extensions to HTTP/3 1731 HTTP/3 permits extension of the protocol. Within the limitations 1732 described in this section, protocol extensions can be used to provide 1733 additional services or alter any aspect of the protocol. Extensions 1734 are effective only within the scope of a single HTTP/3 connection. 1736 This applies to the protocol elements defined in this document. This 1737 does not affect the existing options for extending HTTP, such as 1738 defining new methods, status codes, or header fields. 1740 Extensions are permitted to use new frame types (Section 7.2), new 1741 settings (Section 7.2.4.1), new error codes (Section 8), or new 1742 unidirectional stream types (Section 6.2). Registries are 1743 established for managing these extension points: frame types 1744 (Section 11.2.1), settings (Section 11.2.2), error codes 1745 (Section 11.2.3), and stream types (Section 11.2.4). 1747 Implementations MUST ignore unknown or unsupported values in all 1748 extensible protocol elements. Implementations MUST discard frames 1749 and unidirectional streams that have unknown or unsupported types. 1750 This means that any of these extension points can be safely used by 1751 extensions without prior arrangement or negotiation. However, where 1752 a known frame type is required to be in a specific location, such as 1753 the SETTINGS frame as the first frame of the control stream (see 1754 Section 6.2.1), an unknown frame type does not satisfy that 1755 requirement and SHOULD be treated as an error. 1757 Extensions that could change the semantics of existing protocol 1758 components MUST be negotiated before being used. For example, an 1759 extension that changes the layout of the HEADERS frame cannot be used 1760 until the peer has given a positive signal that this is acceptable. 1761 Coordinating when such a revised layout comes into effect could prove 1762 complex. As such, allocating new identifiers for new definitions of 1763 existing protocol elements is likely to be more effective. 1765 This document doesn't mandate a specific method for negotiating the 1766 use of an extension but notes that a setting (Section 7.2.4.1) could 1767 be used for that purpose. If both peers set a value that indicates 1768 willingness to use the extension, then the extension can be used. If 1769 a setting is used for extension negotiation, the default value MUST 1770 be defined in such a fashion that the extension is disabled if the 1771 setting is omitted. 1773 10. Security Considerations 1775 The security considerations of HTTP/3 should be comparable to those 1776 of HTTP/2 with TLS; the considerations from Section 10 of [HTTP2] 1777 apply in addition to those listed here. 1779 When HTTP Alternative Services is used for discovery for HTTP/3 1780 endpoints, the security considerations of [ALTSVC] also apply. 1782 10.1. Traffic Analysis 1784 Where HTTP/2 employs PADDING frames and Padding fields in other 1785 frames to make a connection more resistant to traffic analysis, 1786 HTTP/3 can either rely on transport-layer padding or employ the 1787 reserved frame and stream types discussed in Section 7.2.8 and 1788 Section 6.2.3. These methods of padding produce different results in 1789 terms of the granularity of padding, how padding is arranged in 1790 relation to the information that is being protected, whether padding 1791 is applied in the case of packet loss, and how an implementation 1792 might control padding. 1794 10.2. Frame Parsing 1796 Several protocol elements contain nested length elements, typically 1797 in the form of frames with an explicit length containing variable- 1798 length integers. This could pose a security risk to an incautious 1799 implementer. An implementation MUST ensure that the length of a 1800 frame exactly matches the length of the fields it contains. 1802 10.3. Early Data 1804 The use of 0-RTT with HTTP/3 creates an exposure to replay attack. 1805 The anti-replay mitigations in [HTTP-REPLAY] MUST be applied when 1806 using HTTP/3 with 0-RTT. 1808 10.4. Migration 1810 Certain HTTP implementations use the client address for logging or 1811 access-control purposes. Since a QUIC client's address might change 1812 during a connection (and future versions might support simultaneous 1813 use of multiple addresses), such implementations will need to either 1814 actively retrieve the client's current address or addresses when they 1815 are relevant or explicitly accept that the original address might 1816 change. 1818 11. IANA Considerations 1820 This document registers a new ALPN protocol ID (Section 11.1) and 1821 creates new registries that manage the assignment of codepoints in 1822 HTTP/3. 1824 11.1. Registration of HTTP/3 Identification String 1826 This document creates a new registration for the identification of 1827 HTTP/3 in the "Application Layer Protocol Negotiation (ALPN) Protocol 1828 IDs" registry established in [RFC7301]. 1830 The "h3" string identifies HTTP/3: 1832 Protocol: HTTP/3 1834 Identification Sequence: 0x68 0x33 ("h3") 1836 Specification: This document 1838 11.2. New Registries 1840 New registries created in this document operate under the QUIC 1841 registration policy documented in Section 22.1 of [QUIC-TRANSPORT]. 1842 These registries all include the common set of fields listed in 1843 Section 22.1.1 of [QUIC-TRANSPORT]. 1845 The initial allocations in these registries created in this document 1846 are all assigned permanent status and list as contact both the IESG 1847 (iesg@ietf.org) and the HTTP working group (ietf-http-wg@w3.org). 1849 11.2.1. Frame Types 1851 This document establishes a registry for HTTP/3 frame type codes. 1852 The "HTTP/3 Frame Type" registry governs a 62-bit space. This 1853 registry follows the QUIC registry policy; see Section 11.2. 1854 Permanent registrations in this registry are assigned using the 1855 Specification Required policy [RFC8126], except for values between 1856 0x00 and 0x3f (in hexadecimal; inclusive), which are assigned using 1857 Standards Action or IESG Approval as defined in Section 4.9 and 4.10 1858 of [RFC8126]. 1860 While this registry is separate from the "HTTP/2 Frame Type" registry 1861 defined in [HTTP2], it is preferable that the assignments parallel 1862 each other where the code spaces overlap. If an entry is present in 1863 only one registry, every effort SHOULD be made to avoid assigning the 1864 corresponding value to an unrelated operation. 1866 In addition to common fields as described in Section 11.2, permanent 1867 registrations in this registry MUST include the following field: 1869 Frame Type: A name or label for the frame type. 1871 Specifications of frame types MUST include a description of the frame 1872 layout and its semantics, including any parts of the frame that are 1873 conditionally present. 1875 The entries in Table 2 are registered by this document. 1877 +--------------+-------+---------------+ 1878 | Frame Type | Value | Specification | 1879 +==============+=======+===============+ 1880 | DATA | 0x0 | Section 7.2.1 | 1881 +--------------+-------+---------------+ 1882 | HEADERS | 0x1 | Section 7.2.2 | 1883 +--------------+-------+---------------+ 1884 | Reserved | 0x2 | N/A | 1885 +--------------+-------+---------------+ 1886 | CANCEL_PUSH | 0x3 | Section 7.2.3 | 1887 +--------------+-------+---------------+ 1888 | SETTINGS | 0x4 | Section 7.2.4 | 1889 +--------------+-------+---------------+ 1890 | PUSH_PROMISE | 0x5 | Section 7.2.5 | 1891 +--------------+-------+---------------+ 1892 | Reserved | 0x6 | N/A | 1893 +--------------+-------+---------------+ 1894 | GOAWAY | 0x7 | Section 7.2.6 | 1895 +--------------+-------+---------------+ 1896 | Reserved | 0x8 | N/A | 1897 +--------------+-------+---------------+ 1898 | Reserved | 0x9 | N/A | 1899 +--------------+-------+---------------+ 1900 | MAX_PUSH_ID | 0xD | Section 7.2.7 | 1901 +--------------+-------+---------------+ 1903 Table 2: Initial HTTP/3 Frame Types 1905 Additionally, each code of the format "0x1f * N + 0x21" for integer 1906 values of N (that is, "0x21", "0x40", ..., through 1907 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 1909 11.2.2. Settings Parameters 1911 This document establishes a registry for HTTP/3 settings. The 1912 "HTTP/3 Settings" registry governs a 62-bit space. This registry 1913 follows the QUIC registry policy; see Section 11.2. Permanent 1914 registrations in this registry are assigned using the Specification 1915 Required policy [RFC8126], except for values between 0x00 and 0x3f 1916 (in hexadecimal; inclusive), which are assigned using Standards 1917 Action or IESG Approval as defined in Section 4.9 and 4.10 of 1918 [RFC8126]. 1920 While this registry is separate from the "HTTP/2 Settings" registry 1921 defined in [HTTP2], it is preferable that the assignments parallel 1922 each other. If an entry is present in only one registry, every 1923 effort SHOULD be made to avoid assigning the corresponding value to 1924 an unrelated operation. 1926 In addition to common fields as described in Section 11.2, permanent 1927 registrations in this registry MUST include the following fields: 1929 Setting Name: A symbolic name for the setting. Specifying a setting 1930 name is optional. 1932 Default: The value of the setting unless otherwise indicated. A 1933 default SHOULD be the most restrictive possible value. 1935 The entries in Table 3 are registered by this document. 1937 +----------------------+-------+-----------------+-----------+ 1938 | Setting Name | Value | Specification | Default | 1939 +======================+=======+=================+===========+ 1940 | Reserved | 0x2 | N/A | N/A | 1941 +----------------------+-------+-----------------+-----------+ 1942 | Reserved | 0x3 | N/A | N/A | 1943 +----------------------+-------+-----------------+-----------+ 1944 | Reserved | 0x4 | N/A | N/A | 1945 +----------------------+-------+-----------------+-----------+ 1946 | Reserved | 0x5 | N/A | N/A | 1947 +----------------------+-------+-----------------+-----------+ 1948 | MAX_HEADER_LIST_SIZE | 0x6 | Section 7.2.4.1 | Unlimited | 1949 +----------------------+-------+-----------------+-----------+ 1951 Table 3: Initial HTTP/3 Settings 1953 Additionally, each code of the format "0x1f * N + 0x21" for integer 1954 values of N (that is, "0x21", "0x40", ..., through 1955 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 1957 11.2.3. Error Codes 1959 This document establishes a registry for HTTP/3 error codes. The 1960 "HTTP/3 Error Code" registry manages a 62-bit space. This registry 1961 follows the QUIC registry policy; see Section 11.2. Permanent 1962 registrations in this registry are assigned using the Specification 1963 Required policy [RFC8126], except for values between 0x00 and 0x3f 1964 (in hexadecimal; inclusive), which are assigned using Standards 1965 Action or IESG Approval as defined in Section 4.9 and 4.10 of 1966 [RFC8126]. 1968 Registrations for error codes are required to include a description 1969 of the error code. An expert reviewer is advised to examine new 1970 registrations for possible duplication with existing error codes. 1971 Use of existing registrations is to be encouraged, but not mandated. 1973 In addition to common fields as described in Section 11.2, permanent 1974 registrations in this registry MUST include the following fields: 1976 Name: A name for the error code. Specifying an error code name is 1977 optional. 1979 Description: A brief description of the error code semantics. 1981 The entries in the Table 4 are registered by this document. 1983 +---------------------------+--------+--------------+---------------+ 1984 | Name | Value | Description | Specification | 1985 +===========================+========+==============+===============+ 1986 | H3_NO_ERROR | 0x0100 | No error | Section 8.1 | 1987 +---------------------------+--------+--------------+---------------+ 1988 | H3_GENERAL_PROTOCOL_ERROR | 0x0101 | General | Section 8.1 | 1989 | | | protocol | | 1990 | | | error | | 1991 +---------------------------+--------+--------------+---------------+ 1992 | H3_INTERNAL_ERROR | 0x0102 | Internal | Section 8.1 | 1993 | | | error | | 1994 +---------------------------+--------+--------------+---------------+ 1995 | H3_STREAM_CREATION_ERROR | 0x0103 | Stream | Section 8.1 | 1996 | | | creation | | 1997 | | | error | | 1998 +---------------------------+--------+--------------+---------------+ 1999 | H3_CLOSED_CRITICAL_STREAM | 0x0104 | Critical | Section 8.1 | 2000 | | | stream was | | 2001 | | | closed | | 2002 +---------------------------+--------+--------------+---------------+ 2003 | H3_FRAME_UNEXPECTED | 0x0105 | Frame not | Section 8.1 | 2004 | | | permitted | | 2005 | | | in the | | 2006 | | | current | | 2007 | | | state | | 2008 +---------------------------+--------+--------------+---------------+ 2009 | H3_FRAME_ERROR | 0x0106 | Frame | Section 8.1 | 2010 | | | violated | | 2011 | | | layout or | | 2012 | | | size rules | | 2013 +---------------------------+--------+--------------+---------------+ 2014 | H3_EXCESSIVE_LOAD | 0x0107 | Peer | Section 8.1 | 2015 | | | generating | | 2016 | | | excessive | | 2017 | | | load | | 2018 +---------------------------+--------+--------------+---------------+ 2019 | H3_ID_ERROR | 0x0108 | An | Section 8.1 | 2020 | | | identifier | | 2021 | | | was used | | 2022 | | | incorrectly | | 2023 +---------------------------+--------+--------------+---------------+ 2024 | H3_SETTINGS_ERROR | 0x0109 | SETTINGS | Section 8.1 | 2025 | | | frame | | 2026 | | | contained | | 2027 | | | invalid | | 2028 | | | values | | 2029 +---------------------------+--------+--------------+---------------+ 2030 | H3_MISSING_SETTINGS | 0x010A | No SETTINGS | Section 8.1 | 2031 | | | frame | | 2032 | | | received | | 2033 +---------------------------+--------+--------------+---------------+ 2034 | H3_REQUEST_REJECTED | 0x010B | Request not | Section 8.1 | 2035 | | | processed | | 2036 +---------------------------+--------+--------------+---------------+ 2037 | H3_REQUEST_CANCELLED | 0x010C | Data no | Section 8.1 | 2038 | | | longer | | 2039 | | | needed | | 2040 +---------------------------+--------+--------------+---------------+ 2041 | H3_REQUEST_INCOMPLETE | 0x010D | Stream | Section 8.1 | 2042 | | | terminated | | 2043 | | | early | | 2044 +---------------------------+--------+--------------+---------------+ 2045 | H3_CONNECT_ERROR | 0x010F | TCP reset | Section 8.1 | 2046 | | | or error on | | 2047 | | | CONNECT | | 2048 | | | request | | 2049 +---------------------------+--------+--------------+---------------+ 2050 | H3_VERSION_FALLBACK | 0x0110 | Retry over | Section 8.1 | 2051 | | | HTTP/1.1 | | 2052 +---------------------------+--------+--------------+---------------+ 2053 Table 4: Initial HTTP/3 Error Codes 2055 Additionally, each code of the format "0x1f * N + 0x21" for integer 2056 values of N (that is, "0x21", "0x40", ..., through 2057 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 2059 11.2.4. Stream Types 2061 This document establishes a registry for HTTP/3 unidirectional stream 2062 types. The "HTTP/3 Stream Type" registry governs a 62-bit space. 2063 This registry follows the QUIC registry policy; see Section 11.2. 2064 Permanent registrations in this registry are assigned using the 2065 Specification Required policy [RFC8126], except for values between 2066 0x00 and 0x3f (in hexadecimal; inclusive), which are assigned using 2067 Standards Action or IESG Approval as defined in Section 4.9 and 4.10 2068 of [RFC8126]. 2070 In addition to common fields as described in Section 11.2, permanent 2071 registrations in this registry MUST include the following fields: 2073 Stream Type: A name or label for the stream type. 2075 Sender: Which endpoint on a connection may initiate a stream of this 2076 type. Values are "Client", "Server", or "Both". 2078 Specifications for permanent registrations MUST include a description 2079 of the stream type, including the layout semantics of the stream 2080 contents. 2082 The entries in the following table are registered by this document. 2084 +----------------+-------+---------------+--------+ 2085 | Stream Type | Value | Specification | Sender | 2086 +================+=======+===============+========+ 2087 | Control Stream | 0x00 | Section 6.2.1 | Both | 2088 +----------------+-------+---------------+--------+ 2089 | Push Stream | 0x01 | Section 4.4 | Server | 2090 +----------------+-------+---------------+--------+ 2092 Table 5 2094 Additionally, each code of the format "0x1f * N + 0x21" for integer 2095 values of N (that is, "0x21", "0x40", ..., through 2096 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 2098 12. References 2100 12.1. Normative References 2102 [ALTSVC] Nottingham, M., McManus, P., and J. Reschke, "HTTP 2103 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 2104 April 2016, . 2106 [HTTP-REPLAY] 2107 Thomson, M., Nottingham, M., and W. Tarreau, "Using Early 2108 Data in HTTP", RFC 8470, DOI 10.17487/RFC8470, September 2109 2018, . 2111 [HTTP2] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 2112 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 2113 DOI 10.17487/RFC7540, May 2015, 2114 . 2116 [QPACK] Krasic, C., Bishop, M., and A. Frindell, Ed., "QPACK: 2117 Header Compression for HTTP over QUIC", Work in Progress, 2118 Internet-Draft, draft-ietf-quic-qpack-14, 21 February 2119 2020, 2120 . 2122 [QUIC-TRANSPORT] 2123 Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based 2124 Multiplexed and Secure Transport", Work in Progress, 2125 Internet-Draft, draft-ietf-quic-transport-27, 21 February 2126 2020, . 2129 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 2130 RFC 793, DOI 10.17487/RFC0793, September 1981, 2131 . 2133 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2134 Requirement Levels", BCP 14, RFC 2119, 2135 DOI 10.17487/RFC2119, March 1997, 2136 . 2138 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2139 Resource Identifier (URI): Generic Syntax", STD 66, 2140 RFC 3986, DOI 10.17487/RFC3986, January 2005, 2141 . 2143 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 2144 Specifications: ABNF", STD 68, RFC 5234, 2145 DOI 10.17487/RFC5234, January 2008, 2146 . 2148 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 2149 Extensions: Extension Definitions", RFC 6066, 2150 DOI 10.17487/RFC6066, January 2011, 2151 . 2153 [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, 2154 DOI 10.17487/RFC6265, April 2011, 2155 . 2157 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2158 Protocol (HTTP/1.1): Message Syntax and Routing", 2159 RFC 7230, DOI 10.17487/RFC7230, June 2014, 2160 . 2162 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2163 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2164 DOI 10.17487/RFC7231, June 2014, 2165 . 2167 [RFC7838] Nottingham, M., McManus, P., and J. Reschke, "HTTP 2168 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 2169 April 2016, . 2171 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2172 Writing an IANA Considerations Section in RFCs", BCP 26, 2173 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2174 . 2176 [RFC8164] Nottingham, M. and M. Thomson, "Opportunistic Security for 2177 HTTP/2", RFC 8164, DOI 10.17487/RFC8164, May 2017, 2178 . 2180 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2181 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2182 May 2017, . 2184 12.2. Informative References 2186 [HPACK] Peon, R. and H. Ruellan, "HPACK: Header Compression for 2187 HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015, 2188 . 2190 [RFC6585] Nottingham, M. and R. Fielding, "Additional HTTP Status 2191 Codes", RFC 6585, DOI 10.17487/RFC6585, April 2012, 2192 . 2194 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 2195 "Transport Layer Security (TLS) Application-Layer Protocol 2196 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 2197 July 2014, . 2199 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 2200 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 2201 . 2203 Appendix A. Considerations for Transitioning from HTTP/2 2205 HTTP/3 is strongly informed by HTTP/2, and bears many similarities. 2206 This section describes the approach taken to design HTTP/3, points 2207 out important differences from HTTP/2, and describes how to map 2208 HTTP/2 extensions into HTTP/3. 2210 HTTP/3 begins from the premise that similarity to HTTP/2 is 2211 preferable, but not a hard requirement. HTTP/3 departs from HTTP/2 2212 where QUIC differs from TCP, either to take advantage of QUIC 2213 features (like streams) or to accommodate important shortcomings 2214 (such as a lack of total ordering). These differences make HTTP/3 2215 similar to HTTP/2 in key aspects, such as the relationship of 2216 requests and responses to streams. However, the details of the 2217 HTTP/3 design are substantially different than HTTP/2. 2219 These departures are noted in this section. 2221 A.1. Streams 2223 HTTP/3 permits use of a larger number of streams (2^62-1) than 2224 HTTP/2. The considerations about exhaustion of stream identifier 2225 space apply, though the space is significantly larger such that it is 2226 likely that other limits in QUIC are reached first, such as the limit 2227 on the connection flow control window. 2229 In contrast to HTTP/2, stream concurrency in HTTP/3 is managed by 2230 QUIC. QUIC considers a stream closed when all data has been received 2231 and sent data has been acknowledged by the peer. HTTP/2 considers a 2232 stream closed when the frame containing the END_STREAM bit has been 2233 committed to the transport. As a result, the stream for an 2234 equivalent exchange could remain "active" for a longer period of 2235 time. HTTP/3 servers might choose to permit a larger number of 2236 concurrent client-initiated bidirectional streams to achieve 2237 equivalent concurrency to HTTP/2, depending on the expected usage 2238 patterns. 2240 Due to the presence of other unidirectional stream types, HTTP/3 does 2241 not rely exclusively on the number of concurrent unidirectional 2242 streams to control the number of concurrent in-flight pushes. 2243 Instead, HTTP/3 clients use the MAX_PUSH_ID frame to control the 2244 number of pushes received from an HTTP/3 server. 2246 A.2. HTTP Frame Types 2248 Many framing concepts from HTTP/2 can be elided on QUIC, because the 2249 transport deals with them. Because frames are already on a stream, 2250 they can omit the stream number. Because frames do not block 2251 multiplexing (QUIC's multiplexing occurs below this layer), the 2252 support for variable-maximum-length packets can be removed. Because 2253 stream termination is handled by QUIC, an END_STREAM flag is not 2254 required. This permits the removal of the Flags field from the 2255 generic frame layout. 2257 Frame payloads are largely drawn from [HTTP2]. However, QUIC 2258 includes many features (e.g., flow control) which are also present in 2259 HTTP/2. In these cases, the HTTP mapping does not re-implement them. 2260 As a result, several HTTP/2 frame types are not required in HTTP/3. 2261 Where an HTTP/2-defined frame is no longer used, the frame ID has 2262 been reserved in order to maximize portability between HTTP/2 and 2263 HTTP/3 implementations. However, even equivalent frames between the 2264 two mappings are not identical. 2266 Many of the differences arise from the fact that HTTP/2 provides an 2267 absolute ordering between frames across all streams, while QUIC 2268 provides this guarantee on each stream only. As a result, if a frame 2269 type makes assumptions that frames from different streams will still 2270 be received in the order sent, HTTP/3 will break them. 2272 Some examples of feature adaptations are described below, as well as 2273 general guidance to extension frame implementors converting an HTTP/2 2274 extension to HTTP/3. 2276 A.2.1. Prioritization Differences 2278 HTTP/2 specifies priority assignments in PRIORITY frames and 2279 (optionally) in HEADERS frames. HTTP/3 does not provide a means of 2280 signaling priority. 2282 Note that while there is no explicit signaling for priority, this 2283 does not mean that prioritization is not important for achieving good 2284 performance. 2286 A.2.2. Header Compression Differences 2288 HPACK was designed with the assumption of in-order delivery. A 2289 sequence of encoded header blocks must arrive (and be decoded) at an 2290 endpoint in the same order in which they were encoded. This ensures 2291 that the dynamic state at the two endpoints remains in sync. 2293 Because this total ordering is not provided by QUIC, HTTP/3 uses a 2294 modified version of HPACK, called QPACK. QPACK uses a single 2295 unidirectional stream to make all modifications to the dynamic table, 2296 ensuring a total order of updates. All frames which contain encoded 2297 headers merely reference the table state at a given time without 2298 modifying it. 2300 [QPACK] provides additional details. 2302 A.2.3. Guidance for New Frame Type Definitions 2304 Frame type definitions in HTTP/3 often use the QUIC variable-length 2305 integer encoding. In particular, Stream IDs use this encoding, which 2306 allows for a larger range of possible values than the encoding used 2307 in HTTP/2. Some frames in HTTP/3 use an identifier rather than a 2308 Stream ID (e.g., Push IDs). Redefinition of the encoding of 2309 extension frame types might be necessary if the encoding includes a 2310 Stream ID. 2312 Because the Flags field is not present in generic HTTP/3 frames, 2313 those frames which depend on the presence of flags need to allocate 2314 space for flags as part of their frame payload. 2316 Other than this issue, frame type HTTP/2 extensions are typically 2317 portable to QUIC simply by replacing Stream 0 in HTTP/2 with a 2318 control stream in HTTP/3. HTTP/3 extensions will not assume 2319 ordering, but would not be harmed by ordering, and would be portable 2320 to HTTP/2 in the same manner. 2322 A.2.4. Mapping Between HTTP/2 and HTTP/3 Frame Types 2324 DATA (0x0): Padding is not defined in HTTP/3 frames. See 2325 Section 7.2.1. 2327 HEADERS (0x1): The PRIORITY region of HEADERS is not defined in 2328 HTTP/3 frames. Padding is not defined in HTTP/3 frames. See 2329 Section 7.2.2. 2331 PRIORITY (0x2): As described in Appendix A.2.1, HTTP/3 does not 2332 provide a means of signaling priority. 2334 RST_STREAM (0x3): RST_STREAM frames do not exist, since QUIC 2335 provides stream lifecycle management. The same code point is used 2336 for the CANCEL_PUSH frame (Section 7.2.3). 2338 SETTINGS (0x4): SETTINGS frames are sent only at the beginning of 2339 the connection. See Section 7.2.4 and Appendix A.3. 2341 PUSH_PROMISE (0x5): The PUSH_PROMISE does not reference a stream; 2342 instead the push stream references the PUSH_PROMISE frame using a 2343 Push ID. See Section 7.2.5. 2345 PING (0x6): PING frames do not exist, since QUIC provides equivalent 2346 functionality. 2348 GOAWAY (0x7): GOAWAY is sent only from server to client and does not 2349 contain an error code. See Section 7.2.6. 2351 WINDOW_UPDATE (0x8): WINDOW_UPDATE frames do not exist, since QUIC 2352 provides flow control. 2354 CONTINUATION (0x9): CONTINUATION frames do not exist; instead, 2355 larger HEADERS/PUSH_PROMISE frames than HTTP/2 are permitted. 2357 Frame types defined by extensions to HTTP/2 need to be separately 2358 registered for HTTP/3 if still applicable. The IDs of frames defined 2359 in [HTTP2] have been reserved for simplicity. Note that the frame 2360 type space in HTTP/3 is substantially larger (62 bits versus 8 bits), 2361 so many HTTP/3 frame types have no equivalent HTTP/2 code points. 2362 See Section 11.2.1. 2364 A.3. HTTP/2 SETTINGS Parameters 2366 An important difference from HTTP/2 is that settings are sent once, 2367 as the first frame of the control stream, and thereafter cannot 2368 change. This eliminates many corner cases around synchronization of 2369 changes. 2371 Some transport-level options that HTTP/2 specifies via the SETTINGS 2372 frame are superseded by QUIC transport parameters in HTTP/3. The 2373 HTTP-level options that are retained in HTTP/3 have the same value as 2374 in HTTP/2. 2376 Below is a listing of how each HTTP/2 SETTINGS parameter is mapped: 2378 SETTINGS_HEADER_TABLE_SIZE: See [QPACK]. 2380 SETTINGS_ENABLE_PUSH: This is removed in favor of the MAX_PUSH_ID 2381 which provides a more granular control over server push. 2383 SETTINGS_MAX_CONCURRENT_STREAMS: QUIC controls the largest open 2384 Stream ID as part of its flow control logic. Specifying 2385 SETTINGS_MAX_CONCURRENT_STREAMS in the SETTINGS frame is an error. 2387 SETTINGS_INITIAL_WINDOW_SIZE: QUIC requires both stream and 2388 connection flow control window sizes to be specified in the 2389 initial transport handshake. Specifying 2390 SETTINGS_INITIAL_WINDOW_SIZE in the SETTINGS frame is an error. 2392 SETTINGS_MAX_FRAME_SIZE: This setting has no equivalent in HTTP/3. 2393 Specifying it in the SETTINGS frame is an error. 2395 SETTINGS_MAX_HEADER_LIST_SIZE: See Section 7.2.4.1. 2397 In HTTP/3, setting values are variable-length integers (6, 14, 30, or 2398 62 bits long) rather than fixed-length 32-bit fields as in HTTP/2. 2399 This will often produce a shorter encoding, but can produce a longer 2400 encoding for settings which use the full 32-bit space. Settings 2401 ported from HTTP/2 might choose to redefine their value to limit it 2402 to 30 bits for more efficient encoding, or to make use of the 62-bit 2403 space if more than 30 bits are required. 2405 Settings need to be defined separately for HTTP/2 and HTTP/3. The 2406 IDs of settings defined in [HTTP2] have been reserved for simplicity. 2407 Note that the settings identifier space in HTTP/3 is substantially 2408 larger (62 bits versus 16 bits), so many HTTP/3 settings have no 2409 equivalent HTTP/2 code point. See Section 11.2.2. 2411 As QUIC streams might arrive out-of-order, endpoints are advised to 2412 not wait for the peers' settings to arrive before responding to other 2413 streams. See Section 7.2.4.2. 2415 A.4. HTTP/2 Error Codes 2417 QUIC has the same concepts of "stream" and "connection" errors that 2418 HTTP/2 provides. However, there is no direct portability of HTTP/2 2419 error codes to HTTP/3 error codes; the values are shifted in order to 2420 prevent accidental or implicit conversion. 2422 The HTTP/2 error codes defined in Section 7 of [HTTP2] logically map 2423 to the HTTP/3 error codes as follows: 2425 NO_ERROR (0x0): H3_NO_ERROR in Section 8.1. 2427 PROTOCOL_ERROR (0x1): This is mapped to H3_GENERAL_PROTOCOL_ERROR 2428 except in cases where more specific error codes have been defined. 2429 This includes H3_FRAME_UNEXPECTED and H3_CLOSED_CRITICAL_STREAM 2430 defined in Section 8.1. 2432 INTERNAL_ERROR (0x2): H3_INTERNAL_ERROR in Section 8.1. 2434 FLOW_CONTROL_ERROR (0x3): Not applicable, since QUIC handles flow 2435 control. 2437 SETTINGS_TIMEOUT (0x4): Not applicable, since no acknowledgement of 2438 SETTINGS is defined. 2440 STREAM_CLOSED (0x5): Not applicable, since QUIC handles stream 2441 management. 2443 FRAME_SIZE_ERROR (0x6): H3_FRAME_ERROR error code defined in 2444 Section 8.1. 2446 REFUSED_STREAM (0x7): H3_REQUEST_REJECTED (in Section 8.1) is used 2447 to indicate that a request was not processed. Otherwise, not 2448 applicable because QUIC handles stream management. 2450 CANCEL (0x8): H3_REQUEST_CANCELLED in Section 8.1. 2452 COMPRESSION_ERROR (0x9): Multiple error codes are defined in 2453 [QPACK]. 2455 CONNECT_ERROR (0xa): H3_CONNECT_ERROR in Section 8.1. 2457 ENHANCE_YOUR_CALM (0xb): H3_EXCESSIVE_LOAD in Section 8.1. 2459 INADEQUATE_SECURITY (0xc): Not applicable, since QUIC is assumed to 2460 provide sufficient security on all connections. 2462 H3_1_1_REQUIRED (0xd): H3_VERSION_FALLBACK in Section 8.1. 2464 Error codes need to be defined for HTTP/2 and HTTP/3 separately. See 2465 Section 11.2.3. 2467 Appendix B. Change Log 2469 *RFC Editor's Note:* Please remove this section prior to 2470 publication of a final version of this document. 2472 B.1. Since draft-ietf-quic-http-26 2474 * No changes 2476 B.2. Since draft-ietf-quic-http-25 2478 * Require QUICv1 for HTTP/3 (#3117, #3323) 2480 * Remove DUPLICATE_PUSH and allow duplicate PUSH_PROMISE (#3275, 2481 #3309) 2483 * Clarify the definition of "malformed" (#3352, #3345) 2485 B.3. Since draft-ietf-quic-http-24 2487 * Removed H3_EARLY_RESPONSE error code; H3_NO_ERROR is recommended 2488 instead (#3130,#3208) 2490 * Unknown error codes are equivalent to H3_NO_ERROR (#3276,#3331) 2492 * Some error codes are reserved for greasing (#3325,#3360) 2494 B.4. Since draft-ietf-quic-http-23 2496 * Removed "quic" Alt-Svc parameter (#3061,#3118) 2498 * Clients need not persist unknown settings for use in 0-RTT 2499 (#3110,#3113) 2501 * Clarify error cases around CANCEL_PUSH (#2819,#3083) 2503 B.5. Since draft-ietf-quic-http-22 2505 * Removed priority signaling (#2922,#2924) 2507 * Further changes to error codes (#2662,#2551): 2509 - Error codes renumbered 2511 - HTTP_MALFORMED_FRAME replaced by HTTP_FRAME_ERROR, 2512 HTTP_ID_ERROR, and others 2514 * Clarify how unknown frame types interact with required frame 2515 sequence (#2867,#2858) 2517 * Describe interactions with the transport in terms of defined 2518 interface terms (#2857,#2805) 2520 * Require the use of the "http-opportunistic" resource (RFC 8164) 2521 when scheme is "http" (#2439,#2973) 2523 * Settings identifiers cannot be duplicated (#2979) 2525 * Changes to SETTINGS frames in 0-RTT (#2972,#2790,#2945): 2527 - Servers must send all settings with non-default values in their 2528 SETTINGS frame, even when resuming 2530 - If a client doesn't have settings associated with a 0-RTT 2531 ticket, it uses the defaults 2533 - Servers can't accept early data if they cannot recover the 2534 settings the client will have remembered 2536 * Clarify that Upgrade and the 101 status code are prohibited 2537 (#2898,#2889) 2539 * Clarify that frame types reserved for greasing can occur on any 2540 stream, but frame types reserved due to HTTP/2 correspondence are 2541 prohibited (#2997,#2692,#2693) 2543 * Unknown error codes cannot be treated as errors (#2998,#2816) 2545 B.6. Since draft-ietf-quic-http-21 2547 No changes 2549 B.7. Since draft-ietf-quic-http-20 2551 * Prohibit closing the control stream (#2509, #2666) 2553 * Change default priority to use an orphan node (#2502, #2690) 2555 * Exclusive priorities are restored (#2754, #2781) 2557 * Restrict use of frames when using CONNECT (#2229, #2702) 2559 * Close and maybe reset streams if a connection error occurs for 2560 CONNECT (#2228, #2703) 2562 * Encourage provision of sufficient unidirectional streams for QPACK 2563 (#2100, #2529, #2762) 2565 * Allow extensions to use server-initiated bidirectional streams 2566 (#2711, #2773) 2568 * Clarify use of maximum header list size setting (#2516, #2774) 2570 * Extensive changes to error codes and conditions of their sending 2572 - Require connection errors for more error conditions (#2511, 2573 #2510) 2575 - Updated the error codes for illegal GOAWAY frames (#2714, 2576 #2707) 2578 - Specified error code for HEADERS on control stream (#2708) 2580 - Specified error code for servers receiving PUSH_PROMISE (#2709) 2581 - Specified error code for receiving DATA before HEADERS (#2715) 2583 - Describe malformed messages and their handling (#2410, #2764) 2585 - Remove HTTP_PUSH_ALREADY_IN_CACHE error (#2812, #2813) 2587 - Refactor Push ID related errors (#2818, #2820) 2589 - Rationalize HTTP/3 stream creation errors (#2821, #2822) 2591 B.8. Since draft-ietf-quic-http-19 2593 * SETTINGS_NUM_PLACEHOLDERS is 0x9 (#2443,#2530) 2595 * Non-zero bits in the Empty field of the PRIORITY frame MAY be 2596 treated as an error (#2501) 2598 B.9. Since draft-ietf-quic-http-18 2600 * Resetting streams following a GOAWAY is recommended, but not 2601 required (#2256,#2457) 2603 * Use variable-length integers throughout (#2437,#2233,#2253,#2275) 2605 - Variable-length frame types, stream types, and settings 2606 identifiers 2608 - Renumbered stream type assignments 2610 - Modified associated reserved values 2612 * Frame layout switched from Length-Type-Value to Type-Length-Value 2613 (#2395,#2235) 2615 * Specified error code for servers receiving DUPLICATE_PUSH (#2497) 2617 * Use connection error for invalid PRIORITY (#2507, #2508) 2619 B.10. Since draft-ietf-quic-http-17 2621 * HTTP_REQUEST_REJECTED is used to indicate a request can be retried 2622 (#2106, #2325) 2624 * Changed error code for GOAWAY on the wrong stream (#2231, #2343) 2626 B.11. Since draft-ietf-quic-http-16 2628 * Rename "HTTP/QUIC" to "HTTP/3" (#1973) 2630 * Changes to PRIORITY frame (#1865, #2075) 2632 - Permitted as first frame of request streams 2634 - Remove exclusive reprioritization 2636 - Changes to Prioritized Element Type bits 2638 * Define DUPLICATE_PUSH frame to refer to another PUSH_PROMISE 2639 (#2072) 2641 * Set defaults for settings, allow request before receiving SETTINGS 2642 (#1809, #1846, #2038) 2644 * Clarify message processing rules for streams that aren't closed 2645 (#1972, #2003) 2647 * Removed reservation of error code 0 and moved HTTP_NO_ERROR to 2648 this value (#1922) 2650 * Removed prohibition of zero-length DATA frames (#2098) 2652 B.12. Since draft-ietf-quic-http-15 2654 Substantial editorial reorganization; no technical changes. 2656 B.13. Since draft-ietf-quic-http-14 2658 * Recommend sensible values for QUIC transport parameters 2659 (#1720,#1806) 2661 * Define error for missing SETTINGS frame (#1697,#1808) 2663 * Setting values are variable-length integers (#1556,#1807) and do 2664 not have separate maximum values (#1820) 2666 * Expanded discussion of connection closure (#1599,#1717,#1712) 2668 * HTTP_VERSION_FALLBACK falls back to HTTP/1.1 (#1677,#1685) 2670 B.14. Since draft-ietf-quic-http-13 2672 * Reserved some frame types for grease (#1333, #1446) 2673 * Unknown unidirectional stream types are tolerated, not errors; 2674 some reserved for grease (#1490, #1525) 2676 * Require settings to be remembered for 0-RTT, prohibit reductions 2677 (#1541, #1641) 2679 * Specify behavior for truncated requests (#1596, #1643) 2681 B.15. Since draft-ietf-quic-http-12 2683 * TLS SNI extension isn't mandatory if an alternative method is used 2684 (#1459, #1462, #1466) 2686 * Removed flags from HTTP/3 frames (#1388, #1398) 2688 * Reserved frame types and settings for use in preserving 2689 extensibility (#1333, #1446) 2691 * Added general error code (#1391, #1397) 2693 * Unidirectional streams carry a type byte and are extensible 2694 (#910,#1359) 2696 * Priority mechanism now uses explicit placeholders to enable 2697 persistent structure in the tree (#441,#1421,#1422) 2699 B.16. Since draft-ietf-quic-http-11 2701 * Moved QPACK table updates and acknowledgments to dedicated streams 2702 (#1121, #1122, #1238) 2704 B.17. Since draft-ietf-quic-http-10 2706 * Settings need to be remembered when attempting and accepting 0-RTT 2707 (#1157, #1207) 2709 B.18. Since draft-ietf-quic-http-09 2711 * Selected QCRAM for header compression (#228, #1117) 2713 * The server_name TLS extension is now mandatory (#296, #495) 2715 * Specified handling of unsupported versions in Alt-Svc (#1093, 2716 #1097) 2718 B.19. Since draft-ietf-quic-http-08 2720 * Clarified connection coalescing rules (#940, #1024) 2722 B.20. Since draft-ietf-quic-http-07 2724 * Changes for integer encodings in QUIC (#595,#905) 2726 * Use unidirectional streams as appropriate (#515, #240, #281, #886) 2728 * Improvement to the description of GOAWAY (#604, #898) 2730 * Improve description of server push usage (#947, #950, #957) 2732 B.21. Since draft-ietf-quic-http-06 2734 * Track changes in QUIC error code usage (#485) 2736 B.22. Since draft-ietf-quic-http-05 2738 * Made push ID sequential, add MAX_PUSH_ID, remove 2739 SETTINGS_ENABLE_PUSH (#709) 2741 * Guidance about keep-alive and QUIC PINGs (#729) 2743 * Expanded text on GOAWAY and cancellation (#757) 2745 B.23. Since draft-ietf-quic-http-04 2747 * Cite RFC 5234 (#404) 2749 * Return to a single stream per request (#245,#557) 2751 * Use separate frame type and settings registries from HTTP/2 (#81) 2753 * SETTINGS_ENABLE_PUSH instead of SETTINGS_DISABLE_PUSH (#477) 2755 * Restored GOAWAY (#696) 2757 * Identify server push using Push ID rather than a stream ID 2758 (#702,#281) 2760 * DATA frames cannot be empty (#700) 2762 B.24. Since draft-ietf-quic-http-03 2764 None. 2766 B.25. Since draft-ietf-quic-http-02 2768 * Track changes in transport draft 2770 B.26. Since draft-ietf-quic-http-01 2772 * SETTINGS changes (#181): 2774 - SETTINGS can be sent only once at the start of a connection; no 2775 changes thereafter 2777 - SETTINGS_ACK removed 2779 - Settings can only occur in the SETTINGS frame a single time 2781 - Boolean format updated 2783 * Alt-Svc parameter changed from "v" to "quic"; format updated 2784 (#229) 2786 * Closing the connection control stream or any message control 2787 stream is a fatal error (#176) 2789 * HPACK Sequence counter can wrap (#173) 2791 * 0-RTT guidance added 2793 * Guide to differences from HTTP/2 and porting HTTP/2 extensions 2794 added (#127,#242) 2796 B.27. Since draft-ietf-quic-http-00 2798 * Changed "HTTP/2-over-QUIC" to "HTTP/QUIC" throughout (#11,#29) 2800 * Changed from using HTTP/2 framing within Stream 3 to new framing 2801 format and two-stream-per-request model (#71,#72,#73) 2803 * Adopted SETTINGS format from draft-bishop-httpbis-extended- 2804 settings-01 2806 * Reworked SETTINGS_ACK to account for indeterminate inter-stream 2807 order (#75) 2809 * Described CONNECT pseudo-method (#95) 2811 * Updated ALPN token and Alt-Svc guidance (#13,#87) 2813 * Application-layer-defined error codes (#19,#74) 2815 B.28. Since draft-shade-quic-http2-mapping-00 2817 * Adopted as base for draft-ietf-quic-http 2819 * Updated authors/editors list 2821 Acknowledgements 2823 The original authors of this specification were Robbie Shade and Mike 2824 Warres. 2826 A substantial portion of Mike's contribution was supported by 2827 Microsoft during his employment there. 2829 Author's Address 2831 Mike Bishop (editor) 2832 Akamai 2834 Email: mbishop@evequefou.be