idnits 2.17.00 (12 Aug 2021) /tmp/idnits25012/draft-ietf-quic-http-21.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 : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([2], [3], [1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (July 08, 2019) is 1047 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) -- Looks like a reference, but probably isn't: '1' on line 2297 -- Looks like a reference, but probably isn't: '2' on line 2299 -- Looks like a reference, but probably isn't: '3' on line 2301 -- Looks like a reference, but probably isn't: '4' on line 2303 == Unused Reference: 'RFC7413' is defined on line 2291, but no explicit reference was found in the text == Outdated reference: A later version (-21) exists of draft-ietf-quic-qpack-09 == Outdated reference: draft-ietf-quic-transport has been published as RFC 9000 -- Duplicate reference: RFC7540, mentioned in 'RFC7540', was also mentioned in 'HTTP2'. -- Duplicate reference: RFC7838, mentioned in 'RFC7838', was also mentioned in 'ALTSVC'. -- Duplicate reference: RFC7231, mentioned in 'HPACK', was also mentioned in 'RFC7231'. Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 9 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 July 08, 2019 5 Expires: January 9, 2020 7 Hypertext Transfer Protocol Version 3 (HTTP/3) 8 draft-ietf-quic-http-21 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 [1]. 25 Working Group information can be found at https://github.com/quicwg 26 [2]; source code and issues list for this draft can be found at 27 https://github.com/quicwg/base-drafts/labels/-http [3]. 29 Status of This Memo 31 This Internet-Draft is submitted in full conformance with the 32 provisions of BCP 78 and BCP 79. 34 Internet-Drafts are working documents of the Internet Engineering 35 Task Force (IETF). Note that other groups may also distribute 36 working documents as Internet-Drafts. The list of current Internet- 37 Drafts is at https://datatracker.ietf.org/drafts/current/. 39 Internet-Drafts are draft documents valid for a maximum of six months 40 and may be updated, replaced, or obsoleted by other documents at any 41 time. It is inappropriate to use Internet-Drafts as reference 42 material or to cite them other than as "work in progress." 44 This Internet-Draft will expire on January 9, 2020. 46 Copyright Notice 48 Copyright (c) 2019 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (https://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the Simplified BSD License. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 64 1.1. Prior versions of HTTP . . . . . . . . . . . . . . . . . 4 65 1.2. Delegation to QUIC . . . . . . . . . . . . . . . . . . . 4 66 2. HTTP/3 Protocol Overview . . . . . . . . . . . . . . . . . . 5 67 2.1. Document Organization . . . . . . . . . . . . . . . . . . 6 68 2.2. Conventions and Terminology . . . . . . . . . . . . . . . 6 69 3. Connection Setup and Management . . . . . . . . . . . . . . . 8 70 3.1. Draft Version Identification . . . . . . . . . . . . . . 8 71 3.2. Discovering an HTTP/3 Endpoint . . . . . . . . . . . . . 8 72 3.2.1. QUIC Version Hints . . . . . . . . . . . . . . . . . 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 . . . . . . . . . 13 79 4.1.3. Malformed Requests and Responses . . . . . . . . . . 14 80 4.2. The CONNECT Method . . . . . . . . . . . . . . . . . . . 14 81 4.3. Prioritization . . . . . . . . . . . . . . . . . . . . . 15 82 4.3.1. Placeholders . . . . . . . . . . . . . . . . . . . . 17 83 4.3.2. Priority Tree Maintenance . . . . . . . . . . . . . . 17 84 4.4. Server Push . . . . . . . . . . . . . . . . . . . . . . . 18 85 5. Connection Closure . . . . . . . . . . . . . . . . . . . . . 20 86 5.1. Idle Connections . . . . . . . . . . . . . . . . . . . . 20 87 5.2. Connection Shutdown . . . . . . . . . . . . . . . . . . . 20 88 5.3. Immediate Application Closure . . . . . . . . . . . . . . 22 89 5.4. Transport Closure . . . . . . . . . . . . . . . . . . . . 22 90 6. Stream Mapping and Usage . . . . . . . . . . . . . . . . . . 22 91 6.1. Bidirectional Streams . . . . . . . . . . . . . . . . . . 23 92 6.2. Unidirectional Streams . . . . . . . . . . . . . . . . . 23 93 6.2.1. Control Streams . . . . . . . . . . . . . . . . . . . 24 94 6.2.2. Push Streams . . . . . . . . . . . . . . . . . . . . 25 95 6.2.3. Reserved Stream Types . . . . . . . . . . . . . . . . 25 96 7. HTTP Framing Layer . . . . . . . . . . . . . . . . . . . . . 26 97 7.1. Frame Layout . . . . . . . . . . . . . . . . . . . . . . 27 98 7.2. Frame Definitions . . . . . . . . . . . . . . . . . . . . 28 99 7.2.1. DATA . . . . . . . . . . . . . . . . . . . . . . . . 28 100 7.2.2. HEADERS . . . . . . . . . . . . . . . . . . . . . . . 29 101 7.2.3. PRIORITY . . . . . . . . . . . . . . . . . . . . . . 29 102 7.2.4. CANCEL_PUSH . . . . . . . . . . . . . . . . . . . . . 32 103 7.2.5. SETTINGS . . . . . . . . . . . . . . . . . . . . . . 32 104 7.2.6. PUSH_PROMISE . . . . . . . . . . . . . . . . . . . . 35 105 7.2.7. GOAWAY . . . . . . . . . . . . . . . . . . . . . . . 36 106 7.2.8. MAX_PUSH_ID . . . . . . . . . . . . . . . . . . . . . 36 107 7.2.9. DUPLICATE_PUSH . . . . . . . . . . . . . . . . . . . 37 108 7.2.10. Reserved Frame Types . . . . . . . . . . . . . . . . 38 109 8. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 38 110 8.1. HTTP/3 Error Codes . . . . . . . . . . . . . . . . . . . 39 111 9. Extensions to HTTP/3 . . . . . . . . . . . . . . . . . . . . 40 112 10. Security Considerations . . . . . . . . . . . . . . . . . . . 41 113 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 42 114 11.1. Registration of HTTP/3 Identification String . . . . . . 42 115 11.2. Registration of QUIC Version Hint Alt-Svc Parameter . . 42 116 11.3. Frame Types . . . . . . . . . . . . . . . . . . . . . . 42 117 11.4. Settings Parameters . . . . . . . . . . . . . . . . . . 43 118 11.5. Error Codes . . . . . . . . . . . . . . . . . . . . . . 44 119 11.6. Stream Types . . . . . . . . . . . . . . . . . . . . . . 47 120 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 48 121 12.1. Normative References . . . . . . . . . . . . . . . . . . 48 122 12.2. Informative References . . . . . . . . . . . . . . . . . 49 123 12.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 50 124 Appendix A. Considerations for Transitioning from HTTP/2 . . . . 50 125 A.1. Streams . . . . . . . . . . . . . . . . . . . . . . . . . 50 126 A.2. HTTP Frame Types . . . . . . . . . . . . . . . . . . . . 50 127 A.2.1. Prioritization Differences . . . . . . . . . . . . . 51 128 A.2.2. Header Compression Differences . . . . . . . . . . . 51 129 A.2.3. Guidance for New Frame Type Definitions . . . . . . . 52 130 A.2.4. Mapping Between HTTP/2 and HTTP/3 Frame Types . . . . 52 131 A.3. HTTP/2 SETTINGS Parameters . . . . . . . . . . . . . . . 53 132 A.4. HTTP/2 Error Codes . . . . . . . . . . . . . . . . . . . 54 133 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 55 134 B.1. Since draft-ietf-quic-http-20 . . . . . . . . . . . . . . 55 135 B.2. Since draft-ietf-quic-http-19 . . . . . . . . . . . . . . 56 136 B.3. Since draft-ietf-quic-http-18 . . . . . . . . . . . . . . 56 137 B.4. Since draft-ietf-quic-http-17 . . . . . . . . . . . . . . 57 138 B.5. Since draft-ietf-quic-http-16 . . . . . . . . . . . . . . 57 139 B.6. Since draft-ietf-quic-http-15 . . . . . . . . . . . . . . 57 140 B.7. Since draft-ietf-quic-http-14 . . . . . . . . . . . . . . 58 141 B.8. Since draft-ietf-quic-http-13 . . . . . . . . . . . . . . 58 142 B.9. Since draft-ietf-quic-http-12 . . . . . . . . . . . . . . 58 143 B.10. Since draft-ietf-quic-http-11 . . . . . . . . . . . . . . 59 144 B.11. Since draft-ietf-quic-http-10 . . . . . . . . . . . . . . 59 145 B.12. Since draft-ietf-quic-http-09 . . . . . . . . . . . . . . 59 146 B.13. Since draft-ietf-quic-http-08 . . . . . . . . . . . . . . 59 147 B.14. Since draft-ietf-quic-http-07 . . . . . . . . . . . . . . 59 148 B.15. Since draft-ietf-quic-http-06 . . . . . . . . . . . . . . 59 149 B.16. Since draft-ietf-quic-http-05 . . . . . . . . . . . . . . 59 150 B.17. Since draft-ietf-quic-http-04 . . . . . . . . . . . . . . 60 151 B.18. Since draft-ietf-quic-http-03 . . . . . . . . . . . . . . 60 152 B.19. Since draft-ietf-quic-http-02 . . . . . . . . . . . . . . 60 153 B.20. Since draft-ietf-quic-http-01 . . . . . . . . . . . . . . 60 154 B.21. Since draft-ietf-quic-http-00 . . . . . . . . . . . . . . 61 155 B.22. Since draft-shade-quic-http2-mapping-00 . . . . . . . . . 61 156 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 61 157 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 61 159 1. Introduction 161 HTTP semantics are used for a broad range of services on the 162 Internet. These semantics have commonly been used with two different 163 TCP mappings, HTTP/1.1 and HTTP/2. HTTP/3 supports the same 164 semantics over a new transport protocol, QUIC. 166 1.1. Prior versions of HTTP 168 HTTP/1.1 is a TCP mapping which uses whitespace-delimited text fields 169 to convey HTTP messages. While these exchanges are human-readable, 170 using whitespace for message formatting leads to parsing difficulties 171 and workarounds to be tolerant of variant behavior. Because each 172 connection can transfer only a single HTTP request or response at a 173 time in each direction, multiple parallel TCP connections are often 174 used, reducing the ability of the congestion controller to accurately 175 manage traffic between endpoints. 177 HTTP/2 introduced a binary framing and multiplexing layer to improve 178 latency without modifying the transport layer. However, because the 179 parallel nature of HTTP/2's multiplexing is not visible to TCP's loss 180 recovery mechanisms, a lost or reordered packet causes all active 181 transactions to experience a stall regardless of whether that 182 transaction was impacted by the lost packet. 184 1.2. Delegation to QUIC 186 The QUIC transport protocol incorporates stream multiplexing and per- 187 stream flow control, similar to that provided by the HTTP/2 framing 188 layer. By providing reliability at the stream level and congestion 189 control across the entire connection, it has the capability to 190 improve the performance of HTTP compared to a TCP mapping. QUIC also 191 incorporates TLS 1.3 at the transport layer, offering comparable 192 security to running TLS over TCP, with the improved connection setup 193 latency of TCP Fast Open [RFC7413]}. 195 This document defines a mapping of HTTP semantics over the QUIC 196 transport protocol, drawing heavily on the design of HTTP/2. While 197 delegating stream lifetime and flow control issues to QUIC, a similar 198 binary framing is used on each stream. Some HTTP/2 features are 199 subsumed by QUIC, while other features are implemented atop QUIC. 201 QUIC is described in [QUIC-TRANSPORT]. For a full description of 202 HTTP/2, see [HTTP2]. 204 2. HTTP/3 Protocol Overview 206 HTTP/3 provides a transport for HTTP semantics using the QUIC 207 transport protocol and an internal framing layer similar to HTTP/2. 209 Once a client knows that an HTTP/3 server exists at a certain 210 endpoint, it opens a QUIC connection. QUIC provides protocol 211 negotiation, stream-based multiplexing, and flow control. An HTTP/3 212 endpoint can be discovered using HTTP Alternative Services; this 213 process is described in greater detail in Section 3.2. 215 Within each stream, the basic unit of HTTP/3 communication is a frame 216 (Section 7.2). Each frame type serves a different purpose. For 217 example, HEADERS and DATA frames form the basis of HTTP requests and 218 responses (Section 4.1). Other frame types like SETTINGS, PRIORITY, 219 and GOAWAY are used to manage the overall connection and 220 relationships between streams. 222 Multiplexing of requests is performed using the QUIC stream 223 abstraction, described in Section 2 of [QUIC-TRANSPORT]. Each 224 request and response consumes a single QUIC stream. Streams are 225 independent of each other, so one stream that is blocked or suffers 226 packet loss does not prevent progress on other streams. 228 Server push is an interaction mode introduced in HTTP/2 [HTTP2] which 229 permits a server to push a request-response exchange to a client in 230 anticipation of the client making the indicated request. This trades 231 off network usage against a potential latency gain. Several HTTP/3 232 frames are used to manage server push, such as PUSH_PROMISE, 233 DUPLICATE_PUSH, MAX_PUSH_ID, and CANCEL_PUSH. 235 As in HTTP/2, request and response headers are compressed for 236 transmission. Because HPACK [HPACK] relies on in-order transmission 237 of compressed header blocks (a guarantee not provided by QUIC), 238 HTTP/3 replaces HPACK with QPACK [QPACK]. QPACK uses separate 239 unidirectional streams to modify and track header table state, while 240 header blocks refer to the state of the table without modifying it. 242 2.1. Document Organization 244 The HTTP/3 specification is split into seven parts. The document 245 begins with a detailed overview of the connection lifecycle and key 246 concepts: 248 o Connection Setup and Management (Section 3) covers how an HTTP/3 249 endpoint is discovered and a connection is established. 251 o HTTP Request Lifecycle (Section 4) describes how HTTP semantics 252 are expressed using frames. 254 o Connection Closure (Section 5) describes how connections are 255 terminated, either gracefully or abruptly. 257 The details of the wire protocol and interactions with the transport 258 are described in subsequent sections: 260 o Stream Mapping and Usage (Section 6) describes the way QUIC 261 streams are used. 263 o HTTP Framing Layer (Section 7) describes the frames used on most 264 streams. 266 o Error Handling (Section 8) describes how error conditions are 267 handled and expressed, either on a particular stream or for the 268 connection as a whole. 270 Additional resources are provided in the final sections: 272 o Extensions to HTTP/3 (Section 9) describes how new capabilities 273 can be added in future documents. 275 o A more detailed comparison between HTTP/2 and HTTP/3 can be found 276 in Appendix A. 278 2.2. Conventions and Terminology 280 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 281 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 282 "OPTIONAL" in this document are to be interpreted as described in BCP 283 14 [RFC2119] [RFC8174] when, and only when, they appear in all 284 capitals, as shown here. 286 Field definitions are given in Augmented Backus-Naur Form (ABNF), as 287 defined in [RFC5234]. 289 This document uses the variable-length integer encoding from 290 [QUIC-TRANSPORT]. 292 The following terms are used: 294 abort: An abrupt termination of a connection or stream, possibly due 295 to an error condition. 297 client: The endpoint that initiates an HTTP/3 connection. Clients 298 send HTTP requests and receive HTTP responses. 300 connection: A transport-layer connection between two endpoints, 301 using QUIC as the transport protocol. 303 connection error: An error that affects the entire HTTP/3 304 connection. 306 endpoint: Either the client or server of the connection. 308 frame: The smallest unit of communication on a stream in HTTP/3, 309 consisting of a header and a variable-length sequence of octets 310 structured according to the frame type. Protocol elements called 311 "frames" exist in both this document and [QUIC-TRANSPORT]. Where 312 frames from [QUIC-TRANSPORT] are referenced, the frame name will 313 be prefaced with "QUIC." For example, "QUIC CONNECTION_CLOSE 314 frames." References without this preface refer to frames defined 315 in Section 7.2. 317 peer: An endpoint. When discussing a particular endpoint, "peer" 318 refers to the endpoint that is remote to the primary subject of 319 discussion. 321 receiver: An endpoint that is receiving frames. 323 sender: An endpoint that is transmitting frames. 325 server: The endpoint that accepts an HTTP/3 connection. Servers 326 receive HTTP requests and send HTTP responses. 328 stream: A bidirectional or unidirectional bytestream provided by the 329 QUIC transport. 331 stream error: An error on the individual HTTP/3 stream. 333 The term "payload body" is defined in Section 3.3 of [RFC7230]. 335 Finally, the terms "gateway", "intermediary", "proxy", and "tunnel" 336 are defined in Section 2.3 of [RFC7230]. Intermediaries act as both 337 client and server at different times. 339 3. Connection Setup and Management 341 3.1. Draft Version Identification 343 *RFC Editor's Note:* Please remove this section prior to 344 publication of a final version of this document. 346 HTTP/3 uses the token "h3" to identify itself in ALPN and Alt-Svc. 347 Only implementations of the final, published RFC can identify 348 themselves as "h3". Until such an RFC exists, implementations MUST 349 NOT identify themselves using this string. 351 Implementations of draft versions of the protocol MUST add the string 352 "-" and the corresponding draft number to the identifier. For 353 example, draft-ietf-quic-http-01 is identified using the string 354 "h3-01". 356 Non-compatible experiments that are based on these draft versions 357 MUST append the string "-" and an experiment name to the identifier. 358 For example, an experimental implementation based on draft-ietf-quic- 359 http-09 which reserves an extra stream for unsolicited transmission 360 of 1980s pop music might identify itself as "h3-09-rickroll". Note 361 that any label MUST conform to the "token" syntax defined in 362 Section 3.2.6 of [RFC7230]. Experimenters are encouraged to 363 coordinate their experiments on the quic@ietf.org mailing list. 365 3.2. Discovering an HTTP/3 Endpoint 367 An HTTP origin advertises the availability of an equivalent HTTP/3 368 endpoint via the Alt-Svc HTTP response header field or the HTTP/2 369 ALTSVC frame ([ALTSVC]), using the ALPN token defined in Section 3.3. 371 For example, an origin could indicate in an HTTP response that HTTP/3 372 was available on UDP port 50781 at the same hostname by including the 373 following header field: 375 Alt-Svc: h3=":50781" 377 On receipt of an Alt-Svc record indicating HTTP/3 support, a client 378 MAY attempt to establish a QUIC connection to the indicated host and 379 port and, if successful, send HTTP requests using the mapping 380 described in this document. 382 Connectivity problems (e.g. firewall blocking UDP) can result in QUIC 383 connection establishment failure, in which case the client SHOULD 384 continue using the existing connection or try another alternative 385 endpoint offered by the origin. 387 Servers MAY serve HTTP/3 on any UDP port, since an alternative always 388 includes an explicit port. 390 3.2.1. QUIC Version Hints 392 This document defines the "quic" parameter for Alt-Svc, which MAY be 393 used to provide version-negotiation hints to HTTP/3 clients. QUIC 394 versions are four-byte sequences with no additional constraints on 395 format. Leading zeros SHOULD be omitted for brevity. 397 Syntax: 399 quic = DQUOTE version-number [ "," version-number ] * DQUOTE 400 version-number = 1*8HEXDIG; hex-encoded QUIC version 402 Where multiple versions are listed, the order of the values reflects 403 the server's preference (with the first value being the most 404 preferred version). Reserved versions MAY be listed, but unreserved 405 versions which are not supported by the alternative SHOULD NOT be 406 present in the list. Origins MAY omit supported versions for any 407 reason. 409 Clients MUST ignore any included versions which they do not support. 410 The "quic" parameter MUST NOT occur more than once; clients SHOULD 411 process only the first occurrence. 413 For example, suppose a server supported both version 0x00000001 and 414 the version rendered in ASCII as "Q034". If it also opted to include 415 the reserved version (from Section 15 of [QUIC-TRANSPORT]) 416 0x1abadaba, it could specify the following header field: 418 Alt-Svc: h3=":49288";quic="1,1abadaba,51303334" 420 A client acting on this header field would drop the reserved version 421 (not supported), then attempt to connect to the alternative using the 422 first version in the list which it does support, if any. 424 3.3. Connection Establishment 426 HTTP/3 relies on QUIC as the underlying transport. The QUIC version 427 being used MUST use TLS version 1.3 or greater as its handshake 428 protocol. HTTP/3 clients MUST indicate the target domain name during 429 the TLS handshake. This may be done using the Server Name Indication 430 (SNI) [RFC6066] extension to TLS or using some other mechanism. 432 QUIC connections are established as described in [QUIC-TRANSPORT]. 433 During connection establishment, HTTP/3 support is indicated by 434 selecting the ALPN token "h3" in the TLS handshake. Support for 435 other application-layer protocols MAY be offered in the same 436 handshake. 438 While connection-level options pertaining to the core QUIC protocol 439 are set in the initial crypto handshake, HTTP/3-specific settings are 440 conveyed in the SETTINGS frame. After the QUIC connection is 441 established, a SETTINGS frame (Section 7.2.5) MUST be sent by each 442 endpoint as the initial frame of their respective HTTP control stream 443 (see Section 6.2.1). 445 3.4. Connection Reuse 447 Once a connection exists to a server endpoint, this connection MAY be 448 reused for requests with multiple different URI authority components. 449 The client MAY send any requests for which the client considers the 450 server authoritative. 452 An authoritative HTTP/3 endpoint is typically discovered because the 453 client has received an Alt-Svc record from the request's origin which 454 nominates the endpoint as a valid HTTP Alternative Service for that 455 origin. As required by [RFC7838], clients MUST check that the 456 nominated server can present a valid certificate for the origin 457 before considering it authoritative. Clients MUST NOT assume that an 458 HTTP/3 endpoint is authoritative for other origins without an 459 explicit signal. 461 A server that does not wish clients to reuse connections for a 462 particular origin can indicate that it is not authoritative for a 463 request by sending a 421 (Misdirected Request) status code in 464 response to the request (see Section 9.1.2 of [HTTP2]). 466 The considerations discussed in Section 9.1 of [HTTP2] also apply to 467 the management of HTTP/3 connections. 469 4. HTTP Request Lifecycle 471 4.1. HTTP Message Exchanges 473 A client sends an HTTP request on a client-initiated bidirectional 474 QUIC stream. A client MUST send only a single request on a given 475 stream. A server sends zero or more non-final HTTP responses on the 476 same stream as the request, followed by a single final HTTP response, 477 as detailed below. 479 An HTTP message (request or response) consists of: 481 1. the message header (see [RFC7230], Section 3.2), sent as a single 482 HEADERS frame (see Section 7.2.2), 484 2. the payload body (see [RFC7230], Section 3.3), sent as a series 485 of DATA frames (see Section 7.2.1), 487 3. optionally, one HEADERS frame containing the trailer-part, if 488 present (see [RFC7230], Section 4.1.2). 490 A server MAY send one or more PUSH_PROMISE frames (see Section 7.2.6) 491 before, after, or interleaved with the frames of a response message. 492 These PUSH_PROMISE frames are not part of the response; see 493 Section 4.4 for more details. 495 The HEADERS and PUSH_PROMISE frames might reference updates to the 496 QPACK dynamic table. While these updates are not directly part of 497 the message exchange, they must be received and processed before the 498 message can be consumed. See Section 4.1.1 for more details. 500 The "chunked" transfer encoding defined in Section 4.1 of [RFC7230] 501 MUST NOT be used. 503 If a DATA frame is received before a HEADERS frame on a either a 504 request or push stream, the recipient MUST respond with a connection 505 error of type HTTP_UNEXPECTED_FRAME (Section 8). 507 Trailing header fields are carried in an additional HEADERS frame 508 following the body. Senders MUST send only one HEADERS frame in the 509 trailers section; receivers MUST discard any subsequent HEADERS 510 frames. 512 A response MAY consist of multiple messages when and only when one or 513 more informational responses (1xx; see [RFC7231], Section 6.2) 514 precede a final response to the same request. Non-final responses do 515 not contain a payload body or trailers. 517 An HTTP request/response exchange fully consumes a bidirectional QUIC 518 stream. After sending a request, a client MUST close the stream for 519 sending. Unless using the CONNECT method (see Section 4.2), clients 520 MUST NOT make stream closure dependent on receiving a response to 521 their request. After sending a final response, the server MUST close 522 the stream for sending. At this point, the QUIC stream is fully 523 closed. 525 When a stream is closed, this indicates the end of an HTTP message. 526 Because some messages are large or unbounded, endpoints SHOULD begin 527 processing partial HTTP messages once enough of the message has been 528 received to make progress. If a client stream terminates without 529 enough of the HTTP message to provide a complete response, the server 530 SHOULD abort its response with the error code 531 HTTP_INCOMPLETE_REQUEST. 533 A server can send a complete response prior to the client sending an 534 entire request if the response does not depend on any portion of the 535 request that has not been sent and received. When this is true, a 536 server MAY request that the client abort transmission of a request 537 without error by triggering a QUIC STOP_SENDING frame with error code 538 HTTP_EARLY_RESPONSE, sending a complete response, and cleanly closing 539 its stream. Clients MUST NOT discard complete responses as a result 540 of having their request terminated abruptly, though clients can 541 always discard responses at their discretion for other reasons. 543 4.1.1. Header Formatting and Compression 545 HTTP message headers carry information as a series of key-value 546 pairs, called header fields. For a listing of registered HTTP header 547 fields, see the "Message Header Field" registry maintained at 548 https://www.iana.org/assignments/message-headers [4]. 550 Just as in previous versions of HTTP, header field names are strings 551 of ASCII characters that are compared in a case-insensitive fashion. 552 Properties of HTTP header field names and values are discussed in 553 more detail in Section 3.2 of [RFC7230], though the wire rendering in 554 HTTP/3 differs. As in HTTP/2, header field names MUST be converted 555 to lowercase prior to their encoding. A request or response 556 containing uppercase header field names MUST be treated as malformed 557 (Section 4.1.3). 559 As in HTTP/2, HTTP/3 uses special pseudo-header fields beginning with 560 the ':' character (ASCII 0x3a) to convey the target URI, the method 561 of the request, and the status code for the response. These pseudo- 562 header fields are defined in Section 8.1.2.3 and 8.1.2.4 of [HTTP2]. 563 Pseudo-header fields are not HTTP header fields. Endpoints MUST NOT 564 generate pseudo-header fields other than those defined in [HTTP2]. 565 The restrictions on the use of pseudo-header fields in 566 Section 8.1.2.1 of [HTTP2] also apply to HTTP/3. 568 HTTP/3 uses QPACK header compression as described in [QPACK], a 569 variation of HPACK which allows the flexibility to avoid header- 570 compression-induced head-of-line blocking. See that document for 571 additional details. 573 An HTTP/3 implementation MAY impose a limit on the maximum size of 574 the message header it will accept on an individual HTTP message. A 575 server that receives a larger header field list than it is willing to 576 handle can send an HTTP 431 (Request Header Fields Too Large) status 577 code [RFC6585]. A client can discard responses that it cannot 578 process. The size of a header field list is calculated based on the 579 uncompressed size of header fields, including the length of the name 580 and value in bytes plus an overhead of 32 bytes for each header 581 field. 583 If an implementation wishes to advise its peer of this limit, it can 584 be conveyed as a number of bytes in the 585 "SETTINGS_MAX_HEADER_LIST_SIZE" parameter. An implementation which 586 has received this parameter SHOULD NOT send an HTTP message header 587 which exceeds the indicated size, as the peer will likely refuse to 588 process it. However, because this limit is applied at each hop, 589 messages below this limit are not guaranteed to be accepted. 591 4.1.2. Request Cancellation and Rejection 593 Clients can cancel requests by aborting the stream (QUIC RESET_STREAM 594 and/or STOP_SENDING frames, as appropriate) with an error code of 595 HTTP_REQUEST_CANCELLED (Section 8.1). When the client cancels a 596 response, it indicates that this response is no longer of interest. 597 Implementations SHOULD cancel requests by aborting both directions of 598 a stream. 600 When the server rejects a request without performing any application 601 processing, it SHOULD abort its response stream with the error code 602 HTTP_REQUEST_REJECTED. In this context, "processed" means that some 603 data from the stream was passed to some higher layer of software that 604 might have taken some action as a result. The client can treat 605 requests rejected by the server as though they had never been sent at 606 all, thereby allowing them to be retried later on a new connection. 607 Servers MUST NOT use the HTTP_REQUEST_REJECTED error code for 608 requests which were partially or fully processed. When a server 609 abandons a response after partial processing, it SHOULD abort its 610 response stream with the error code HTTP_REQUEST_CANCELLED. 612 When a client sends a STOP_SENDING with HTTP_REQUEST_CANCELLED, a 613 server MAY send the error code HTTP_REQUEST_REJECTED in the 614 corresponding RESET_STREAM if no processing was performed. Clients 615 MUST NOT reset streams with the HTTP_REQUEST_REJECTED error code 616 except in response to a QUIC STOP_SENDING frame that contains the 617 same code. 619 If a stream is cancelled after receiving a complete response, the 620 client MAY ignore the cancellation and use the response. However, if 621 a stream is cancelled after receiving a partial response, the 622 response SHOULD NOT be used. Automatically retrying such requests is 623 not possible, unless this is otherwise permitted (e.g., idempotent 624 actions like GET, PUT, or DELETE). 626 4.1.3. Malformed Requests and Responses 628 A malformed request or response is one that is an otherwise valid 629 sequence of frames but is invalid due to the presence of extraneous 630 frames, prohibited header fields, the absence of mandatory header 631 fields, or the inclusion of uppercase header field names. 633 A request or response that includes a payload body can include a 634 "content-length" header field. A request or response is also 635 malformed if the value of a content-length header field does not 636 equal the sum of the DATA frame payload lengths that form the body. 637 A response that is defined to have no payload, as described in 638 Section 3.3.2 of [RFC7230] can have a non-zero content-length header 639 field, even though no content is included in DATA frames. 641 Intermediaries that process HTTP requests or responses (i.e., any 642 intermediary not acting as a tunnel) MUST NOT forward a malformed 643 request or response. Malformed requests or responses that are 644 detected MUST be treated as a stream error (Section 8) of type 645 HTTP_GENERAL_PROTOCOL_ERROR. 647 For malformed requests, a server MAY send an HTTP response prior to 648 closing or resetting the stream. Clients MUST NOT accept a malformed 649 response. Note that these requirements are intended to protect 650 against several types of common attacks against HTTP; they are 651 deliberately strict because being permissive can expose 652 implementations to these vulnerabilities. 654 4.2. The CONNECT Method 656 The pseudo-method CONNECT ([RFC7231], Section 4.3.6) is primarily 657 used with HTTP proxies to establish a TLS session with an origin 658 server for the purposes of interacting with "https" resources. In 659 HTTP/1.x, CONNECT is used to convert an entire HTTP connection into a 660 tunnel to a remote host. In HTTP/2, the CONNECT method is used to 661 establish a tunnel over a single HTTP/2 stream to a remote host for 662 similar purposes. 664 A CONNECT request in HTTP/3 functions in the same manner as in 665 HTTP/2. The request MUST be formatted as described in [HTTP2], 666 Section 8.3. A CONNECT request that does not conform to these 667 restrictions is malformed (see Section 4.1.3). The request stream 668 MUST NOT be closed at the end of the request. 670 A proxy that supports CONNECT establishes a TCP connection 671 ([RFC0793]) to the server identified in the ":authority" pseudo- 672 header field. Once this connection is successfully established, the 673 proxy sends a HEADERS frame containing a 2xx series status code to 674 the client, as defined in [RFC7231], Section 4.3.6. 676 All DATA frames on the stream correspond to data sent or received on 677 the TCP connection. Any DATA frame sent by the client is transmitted 678 by the proxy to the TCP server; data received from the TCP server is 679 packaged into DATA frames by the proxy. Note that the size and 680 number of TCP segments is not guaranteed to map predictably to the 681 size and number of HTTP DATA or QUIC STREAM frames. 683 Once the CONNECT method has completed, only DATA frames are permitted 684 to be sent on the stream. Extension frames MAY be used if 685 specifically permitted by the definition of the extension. Receipt 686 of any other frame type MUST be treated as a connection error of type 687 HTTP_UNEXPECTED_FRAME. 689 The TCP connection can be closed by either peer. When the client 690 ends the request stream (that is, the receive stream at the proxy 691 enters the "Data Recvd" state), the proxy will set the FIN bit on its 692 connection to the TCP server. When the proxy receives a packet with 693 the FIN bit set, it will terminate the send stream that it sends to 694 the client. TCP connections which remain half-closed in a single 695 direction are not invalid, but are often handled poorly by servers, 696 so clients SHOULD NOT close a stream for sending while they still 697 expect to receive data from the target of the CONNECT. 699 A TCP connection error is signaled with QUIC RESET_STREAM frame. A 700 proxy treats any error in the TCP connection, which includes 701 receiving a TCP segment with the RST bit set, as a stream error of 702 type HTTP_CONNECT_ERROR (Section 8.1). Correspondingly, if a proxy 703 detects an error with the stream or the QUIC connection, it MUST 704 close the TCP connection. If the underlying TCP implementation 705 permits it, the proxy SHOULD send a TCP segment with the RST bit set. 707 4.3. Prioritization 709 The purpose of prioritization is to allow a client to express how it 710 would prefer the server to allocate resources when managing 711 concurrent streams. Most importantly, priority can be used to select 712 streams for transmitting frames when there is limited capacity for 713 sending. 715 HTTP/3 uses a priority scheme similar to that described in [RFC7540], 716 Section 5.3. In this priority scheme, a given element can be 717 designated as dependent upon another element. Each dependency is 718 assigned a relative weight, a number that is used to determine the 719 relative proportion of available resources that are assigned to 720 streams dependent on the same stream. This information is expressed 721 in the PRIORITY frame Section 7.2.3 which identifies the element and 722 the dependency. The elements that can be prioritized are: 724 o Requests, identified by the ID of the request stream 726 o Pushes, identified by the Push ID of the promised resource 727 (Section 7.2.6) 729 o Placeholders, identified by a Placeholder ID 731 Taken together, the dependencies across all prioritized elements in a 732 connection form a dependency tree. An element can depend on another 733 element or on the root of the tree. The tree also contains an orphan 734 placeholder. This placeholder cannot be reprioritized, and no 735 resources should be allocated to descendants of the orphan 736 placeholder if progress can be made on descendants of the root. The 737 structure of the dependency tree changes as PRIORITY frames modify 738 the dependency links between other prioritized elements. 740 An exclusive flag allows for the insertion of a new level of 741 dependencies. The exclusive flag causes the prioritized element to 742 become the sole dependency of its parent, causing other dependencies 743 to become dependent on the exclusive element. 745 All dependent streams are allocated an integer weight between 1 and 746 256 (inclusive), derived by adding one to the weight expressed in the 747 PRIORITY frame. 749 Streams with the same parent SHOULD be allocated resources 750 proportionally based on their weight. Thus, if stream B depends on 751 stream A with weight 4, stream C depends on stream A with weight 12, 752 and no progress can be made on stream A, stream B ideally receives 753 one-third of the resources allocated to stream C. 755 A reference to an element which is no longer in the tree is treated 756 as a reference to the orphan placeholder. Due to reordering between 757 streams, an element can also be prioritized which is not yet in the 758 tree. Such elements are added to the tree with the requested 759 priority. If a prioritized element depends on another element which 760 is not yet in the tree, the requested parent is first added to the 761 tree with the default priority. 763 When a prioritized element is first created, it has a default initial 764 weight of 16 and a default dependency. Requests and placeholders are 765 dependent on the orphan placeholder; pushes are dependent on the 766 client request on which the PUSH_PROMISE frame was sent. 768 Priorities can be updated by sending a PRIORITY frame (see 769 Section 7.2.3) on the control stream. 771 4.3.1. Placeholders 773 In HTTP/2, certain implementations used closed or unused streams as 774 placeholders in describing the relative priority of requests. This 775 created confusion as servers could not reliably identify which 776 elements of the priority tree could be discarded safely. Clients 777 could potentially reference closed streams long after the server had 778 discarded state, leading to disparate views of the prioritization the 779 client had attempted to express. 781 In HTTP/3, a number of placeholders are explicitly permitted by the 782 server using the "SETTINGS_NUM_PLACEHOLDERS" setting. Because the 783 server commits to maintaining these placeholders in the 784 prioritization tree, clients can use them with confidence that the 785 server will not have discarded the state. Clients MUST NOT send the 786 "SETTINGS_NUM_PLACEHOLDERS" setting; receipt of this setting by a 787 server MUST be treated as a connection error of type 788 "HTTP_SETTINGS_ERROR". 790 Client-controlled placeholders are identified by an ID between zero 791 and one less than the number of placeholders the server has 792 permitted. The orphan placeholder cannot be prioritized or 793 referenced by the client. 795 Like streams, client-controlled placeholders have priority 796 information associated with them. 798 4.3.2. Priority Tree Maintenance 800 Because placeholders will be used to "root" any persistent structure 801 of the tree which the client cares about retaining, servers can 802 aggressively prune inactive regions from the priority tree. For 803 prioritization purposes, a node in the tree is considered "inactive" 804 when the corresponding stream has been closed for at least two round- 805 trip times (using any reasonable estimate available on the server). 806 This delay helps mitigate race conditions where the server has pruned 807 a node the client believed was still active and used as a Stream 808 Dependency. 810 Specifically, the server MAY at any time: 812 o Identify and discard branches of the tree containing only inactive 813 nodes (i.e. a node with only other inactive nodes as descendants, 814 along with those descendants) 816 o Identify and condense interior regions of the tree containing only 817 inactive nodes, allocating weight appropriately 819 x x x 820 | | | 821 P P P 822 / \ | | 823 I I ==> I ==> A 824 / \ | | 825 A I A A 826 | | 827 A A 829 Figure 1: Example of Priority Tree Pruning 831 In the example in Figure 1, "P" represents a Placeholder, "A" 832 represents an active node, and "I" represents an inactive node. In 833 the first step, the server discards two inactive branches (each a 834 single node). In the second step, the server condenses an interior 835 inactive node. Note that these transformations will result in no 836 change in the resources allocated to a particular active stream. 838 Clients SHOULD assume the server is actively performing such pruning 839 and SHOULD NOT declare a dependency on a stream it knows to have been 840 closed. 842 4.4. Server Push 844 Server push is an interaction mode introduced in HTTP/2 [HTTP2] which 845 permits a server to push a request-response exchange to a client in 846 anticipation of the client making the indicated request. This trades 847 off network usage against a potential latency gain. HTTP/3 server 848 push is similar to what is described in HTTP/2 [HTTP2], but uses 849 different mechanisms. 851 Each server push is identified by a unique Push ID. This Push ID is 852 used in a single PUSH_PROMISE frame (see Section 7.2.6) which carries 853 the request headers, possibly included in one or more DUPLICATE_PUSH 854 frames (see Section 7.2.9), then included with the push stream which 855 ultimately fulfills those promises. 857 Server push is only enabled on a connection when a client sends a 858 MAX_PUSH_ID frame (see Section 7.2.8). A server cannot use server 859 push until it receives a MAX_PUSH_ID frame. A client sends 860 additional MAX_PUSH_ID frames to control the number of pushes that a 861 server can promise. A server SHOULD use Push IDs sequentially, 862 starting at 0. A client MUST treat receipt of a push stream with a 863 Push ID that is greater than the maximum Push ID as a connection 864 error of type HTTP_ID_ERROR. 866 The header of the request message is carried by a PUSH_PROMISE frame 867 (see Section 7.2.6) on the request stream which generated the push. 868 This allows the server push to be associated with a client request. 869 Promised requests MUST conform to the requirements in Section 8.2 of 870 [HTTP2]. 872 The same server push can be associated with additional client 873 requests using a DUPLICATE_PUSH frame (see Section 7.2.9). 875 Ordering of a PUSH_PROMISE or DUPLICATE_PUSH in relation to certain 876 parts of the response is important. The server SHOULD send 877 PUSH_PROMISE or DUPLICATE_PUSH frames prior to sending HEADERS or 878 DATA frames that reference the promised responses. This reduces the 879 chance that a client requests a resource that will be pushed by the 880 server. 882 When a server later fulfills a promise, the server push response is 883 conveyed on a push stream (see Section 6.2.2). The push stream 884 identifies the Push ID of the promise that it fulfills, then contains 885 a response to the promised request using the same format described 886 for responses in Section 4.1. 888 Due to reordering, DUPLICATE_PUSH frames or push stream data can 889 arrive before the corresponding PUSH_PROMISE frame. When a client 890 receives a DUPLICATE_PUSH frame for an as-yet-unknown Push ID, the 891 request headers of the push are not immediately available. The 892 client can either delay generating new requests for content 893 referenced following the DUPLICATE_PUSH frame until the request 894 headers become available, or can initiate requests for discovered 895 resources and cancel the requests if the requested resource is 896 already being pushed. When a client receives a new push stream with 897 an as-yet-unknown Push ID, both the associated client request and the 898 pushed request headers are unknown. The client can buffer the stream 899 data in expectation of the matching PUSH_PROMISE. The client can use 900 stream flow control (see section 4.1 of [QUIC-TRANSPORT]) to limit 901 the amount of data a server may commit to the pushed stream. 903 If a promised server push is not needed by the client, the client 904 SHOULD send a CANCEL_PUSH frame. If the push stream is already open 905 or opens after sending the CANCEL_PUSH frame, a QUIC STOP_SENDING 906 frame with an error code of HTTP_REQUEST_CANCELLED can be used. This 907 asks the server not to transfer additional data and indicates that it 908 will be discarded upon receipt. 910 5. Connection Closure 912 Once established, an HTTP/3 connection can be used for many requests 913 and responses over time until the connection is closed. Connection 914 closure can happen in any of several different ways. 916 5.1. Idle Connections 918 Each QUIC endpoint declares an idle timeout during the handshake. If 919 the connection remains idle (no packets received) for longer than 920 this duration, the peer will assume that the connection has been 921 closed. HTTP/3 implementations will need to open a new connection 922 for new requests if the existing connection has been idle for longer 923 than the server's advertised idle timeout, and SHOULD do so if 924 approaching the idle timeout. 926 HTTP clients are expected to request that the transport keep 927 connections open while there are responses outstanding for requests 928 or server pushes, as described in Section 19.2 of [QUIC-TRANSPORT]. 929 If the client is not expecting a response from the server, allowing 930 an idle connection to time out is preferred over expending effort 931 maintaining a connection that might not be needed. A gateway MAY 932 maintain connections in anticipation of need rather than incur the 933 latency cost of connection establishment to servers. Servers SHOULD 934 NOT actively keep connections open. 936 5.2. Connection Shutdown 938 Even when a connection is not idle, either endpoint can decide to 939 stop using the connection and let the connection close gracefully. 940 Since clients drive request generation, clients perform a connection 941 shutdown by not sending additional requests on the connection; 942 responses and pushed responses associated to previous requests will 943 continue to completion. Servers perform the same function by 944 communicating with clients. 946 Servers initiate the shutdown of a connection by sending a GOAWAY 947 frame (Section 7.2.7). The GOAWAY frame indicates that client- 948 initiated requests on lower stream IDs were or might be processed in 949 this connection, while requests on the indicated stream ID and 950 greater were rejected. This enables client and server to agree on 951 which requests were accepted prior to the connection shutdown. This 952 identifier MAY be zero if no requests were processed. Servers SHOULD 953 NOT increase the QUIC MAX_STREAMS limit after sending a GOAWAY frame. 955 Clients MUST NOT send new requests on the connection after receiving 956 GOAWAY; a new connection MAY be established to send additional 957 requests. 959 Some requests might already be in transit. If the client has already 960 sent requests on streams with a Stream ID greater than or equal to 961 that indicated in the GOAWAY frame, those requests will not be 962 processed and MAY be retried by the client on a different connection. 963 The client MAY cancel these requests. It is RECOMMENDED that the 964 server explicitly reject such requests (see Section 4.1.2) in order 965 to clean up transport state for the affected streams. 967 Requests on Stream IDs less than the Stream ID in the GOAWAY frame 968 might have been processed; their status cannot be known until a 969 response is received, the stream is reset individually, or the 970 connection terminates. Servers MAY reject individual requests on 971 streams below the indicated ID if these requests were not processed. 973 Servers SHOULD send a GOAWAY frame when the closing of a connection 974 is known in advance, even if the advance notice is small, so that the 975 remote peer can know whether a request has been partially processed 976 or not. For example, if an HTTP client sends a POST at the same time 977 that a server closes a QUIC connection, the client cannot know if the 978 server started to process that POST request if the server does not 979 send a GOAWAY frame to indicate what streams it might have acted on. 981 A client that is unable to retry requests loses all requests that are 982 in flight when the server closes the connection. A server MAY send 983 multiple GOAWAY frames indicating different stream IDs, but MUST NOT 984 increase the value they send in the last Stream ID, since clients 985 might already have retried unprocessed requests on another 986 connection. A server that is attempting to gracefully shut down a 987 connection SHOULD send an initial GOAWAY frame with the last Stream 988 ID set to the maximum value allowed by QUIC's MAX_STREAMS and SHOULD 989 NOT increase the MAX_STREAMS limit thereafter. This signals to the 990 client that a shutdown is imminent and that initiating further 991 requests is prohibited. After allowing time for any in-flight 992 requests (at least one round-trip time), the server MAY send another 993 GOAWAY frame with an updated last Stream ID. This ensures that a 994 connection can be cleanly shut down without losing requests. 996 Once all accepted requests have been processed, the server can permit 997 the connection to become idle, or MAY initiate an immediate closure 998 of the connection. An endpoint that completes a graceful shutdown 999 SHOULD use the HTTP_NO_ERROR code when closing the connection. 1001 If a client has consumed all available bidirectional stream IDs with 1002 requests, the server need not send a GOAWAY frame, since the client 1003 is unable to make further requests. 1005 5.3. Immediate Application Closure 1007 An HTTP/3 implementation can immediately close the QUIC connection at 1008 any time. This results in sending a QUIC CONNECTION_CLOSE frame to 1009 the peer; the error code in this frame indicates to the peer why the 1010 connection is being closed. See Section 8 for error codes which can 1011 be used when closing a connection. 1013 Before closing the connection, a GOAWAY MAY be sent to allow the 1014 client to retry some requests. Including the GOAWAY frame in the 1015 same packet as the QUIC CONNECTION_CLOSE frame improves the chances 1016 of the frame being received by clients. 1018 5.4. Transport Closure 1020 For various reasons, the QUIC transport could indicate to the 1021 application layer that the connection has terminated. This might be 1022 due to an explicit closure by the peer, a transport-level error, or a 1023 change in network topology which interrupts connectivity. 1025 If a connection terminates without a GOAWAY frame, clients MUST 1026 assume that any request which was sent, whether in whole or in part, 1027 might have been processed. 1029 6. Stream Mapping and Usage 1031 A QUIC stream provides reliable in-order delivery of bytes, but makes 1032 no guarantees about order of delivery with regard to bytes on other 1033 streams. On the wire, data is framed into QUIC STREAM frames, but 1034 this framing is invisible to the HTTP framing layer. The transport 1035 layer buffers and orders received QUIC STREAM frames, exposing the 1036 data contained within as a reliable byte stream to the application. 1037 Although QUIC permits out-of-order delivery within a stream, HTTP/3 1038 does not make use of this feature. 1040 QUIC streams can be either unidirectional, carrying data only from 1041 initiator to receiver, or bidirectional. Streams can be initiated by 1042 either the client or the server. For more detail on QUIC streams, 1043 see Section 2 of [QUIC-TRANSPORT]. 1045 When HTTP headers and data are sent over QUIC, the QUIC layer handles 1046 most of the stream management. HTTP does not need to do any separate 1047 multiplexing when using QUIC - data sent over a QUIC stream always 1048 maps to a particular HTTP transaction or connection context. 1050 6.1. Bidirectional Streams 1052 All client-initiated bidirectional streams are used for HTTP requests 1053 and responses. A bidirectional stream ensures that the response can 1054 be readily correlated with the request. This means that the client's 1055 first request occurs on QUIC stream 0, with subsequent requests on 1056 stream 4, 8, and so on. In order to permit these streams to open, an 1057 HTTP/3 client SHOULD send non-zero values for the QUIC transport 1058 parameters "initial_max_stream_data_bidi_local". An HTTP/3 server 1059 SHOULD send non-zero values for the QUIC transport parameters 1060 "initial_max_stream_data_bidi_remote" and "initial_max_bidi_streams". 1061 It is RECOMMENDED that "initial_max_bidi_streams" be no smaller than 1062 100, so as to not unnecessarily limit parallelism. 1064 HTTP/3 does not use server-initiated bidirectional streams, though an 1065 extension could define a use for these streams. Clients MUST treat 1066 receipt of a server-initiated bidirectional stream as a connection 1067 error of type HTTP_STREAM_CREATION_ERROR unless such an extension has 1068 been negotiated. 1070 6.2. Unidirectional Streams 1072 Unidirectional streams, in either direction, are used for a range of 1073 purposes. The purpose is indicated by a stream type, which is sent 1074 as a variable-length integer at the start of the stream. The format 1075 and structure of data that follows this integer is determined by the 1076 stream type. 1078 0 1 2 3 1079 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 1080 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1081 | Stream Type (i) ... 1082 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1084 Figure 2: Unidirectional Stream Header 1086 Some stream types are reserved (Section 6.2.3). Two stream types are 1087 defined in this document: control streams (Section 6.2.1) and push 1088 streams (Section 6.2.2). Other stream types can be defined by 1089 extensions to HTTP/3; see Section 9 for more details. 1091 The performance of HTTP/3 connections in the early phase of their 1092 lifetime is sensitive to the creation and exchange of data on 1093 unidirectional streams. Endpoints that set low values for the QUIC 1094 transport parameters "initial_max_uni_streams" and 1095 "initial_max_stream_data_uni" will increase the chance that the 1096 remote peer reaches the limit early and becomes blocked. In 1097 particular, the value chosen for "initial_max_uni_streams" should 1098 consider that remote peers may wish to exercise reserved stream 1099 behavior (Section 6.2.3). To avoid blocking, both clients and 1100 servers MUST allow the peer to create at least one unidirectional 1101 stream for the HTTP control stream plus the number of unidirectional 1102 streams required by mandatory extensions (such as QPACK) by setting 1103 an appropriate value for the QUIC transport parameter 1104 "initial_max_uni_streams" (three being the minimum value required for 1105 the base HTTP/3 protocol and QPACK), and SHOULD use a value of 1,024 1106 or greater for the QUIC transport parameter 1107 "initial_max_stream_data_uni". 1109 Note that an endpoint is not required to grant additional credits to 1110 create more unidirectional streams if its peer consumes all the 1111 initial credits before creating the critical unidirectional streams. 1112 Endpoints SHOULD create the HTTP control stream as well as the 1113 unidirectional streams required by mandatory extensions (such as the 1114 QPACK encoder and decoder streams) first, and then create additional 1115 streams as allowed by their peer. 1117 If the stream header indicates a stream type which is not supported 1118 by the recipient, the remainder of the stream cannot be consumed as 1119 the semantics are unknown. Recipients of unknown stream types MAY 1120 trigger a QUIC STOP_SENDING frame with an error code of 1121 HTTP_STREAM_CREATION_ERROR, but MUST NOT consider such streams to be 1122 a connection error of any kind. 1124 Implementations MAY send stream types before knowing whether the peer 1125 supports them. However, stream types which could modify the state or 1126 semantics of existing protocol components, including QPACK or other 1127 extensions, MUST NOT be sent until the peer is known to support them. 1129 A sender can close or reset a unidirectional stream unless otherwise 1130 specified. A receiver MUST tolerate unidirectional streams being 1131 closed or reset prior to the reception of the unidirectional stream 1132 header. 1134 6.2.1. Control Streams 1136 A control stream is indicated by a stream type of "0x00". Data on 1137 this stream consists of HTTP/3 frames, as defined in Section 7.2. 1139 Each side MUST initiate a single control stream at the beginning of 1140 the connection and send its SETTINGS frame as the first frame on this 1141 stream. If the first frame of the control stream is any other frame 1142 type, this MUST be treated as a connection error of type 1143 HTTP_MISSING_SETTINGS. Only one control stream per peer is 1144 permitted; receipt of a second stream which claims to be a control 1145 stream MUST be treated as a connection error of type 1146 HTTP_STREAM_CREATION_ERROR. The sender MUST NOT close the control 1147 stream, and the receiver MUST NOT request that the sender close the 1148 control stream. If either control stream is closed at any point, 1149 this MUST be treated as a connection error of type 1150 HTTP_CLOSED_CRITICAL_STREAM. 1152 A pair of unidirectional streams is used rather than a single 1153 bidirectional stream. This allows either peer to send data as soon 1154 as it is able. Depending on whether 0-RTT is enabled on the 1155 connection, either client or server might be able to send stream data 1156 first after the cryptographic handshake completes. 1158 6.2.2. Push Streams 1160 Server push is an optional feature introduced in HTTP/2 that allows a 1161 server to initiate a response before a request has been made. See 1162 Section 4.4 for more details. 1164 A push stream is indicated by a stream type of "0x01", followed by 1165 the Push ID of the promise that it fulfills, encoded as a variable- 1166 length integer. The remaining data on this stream consists of HTTP/3 1167 frames, as defined in Section 7.2, and fulfills a promised server 1168 push. Server push and Push IDs are described in Section 4.4. 1170 Only servers can push; if a server receives a client-initiated push 1171 stream, this MUST be treated as a connection error of type 1172 HTTP_STREAM_CREATION_ERROR. 1174 0 1 2 3 1175 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 1176 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1177 | 0x01 (i) ... 1178 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1179 | Push ID (i) ... 1180 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1182 Figure 3: Push Stream Header 1184 Each Push ID MUST only be used once in a push stream header. If a 1185 push stream header includes a Push ID that was used in another push 1186 stream header, the client MUST treat this as a connection error of 1187 type HTTP_ID_ERROR. 1189 6.2.3. Reserved Stream Types 1191 Stream types of the format "0x1f * N + 0x21" for integer values of N 1192 are reserved to exercise the requirement that unknown types be 1193 ignored. These streams have no semantics, and can be sent when 1194 application-layer padding is desired. They MAY also be sent on 1195 connections where no data is currently being transferred. Endpoints 1196 MUST NOT consider these streams to have any meaning upon receipt. 1198 The payload and length of the stream are selected in any manner the 1199 implementation chooses. 1201 7. HTTP Framing Layer 1203 HTTP frames are carried on QUIC streams, as described in Section 6. 1204 HTTP/3 defines three stream types: control stream, request stream, 1205 and push stream. This section describes HTTP/3 frame formats and the 1206 streams types on which they are permitted; see Table 1 for an 1207 overview. A comparison between HTTP/2 and HTTP/3 frames is provided 1208 in Appendix A.2. 1210 +----------------+------------+------------+-----------+------------+ 1211 | Frame | Control | Request | Push | Section | 1212 | | Stream | Stream | Stream | | 1213 +----------------+------------+------------+-----------+------------+ 1214 | DATA | No | Yes | Yes | Section | 1215 | | | | | 7.2.1 | 1216 | | | | | | 1217 | HEADERS | No | Yes | Yes | Section | 1218 | | | | | 7.2.2 | 1219 | | | | | | 1220 | PRIORITY | Yes | No | No | Section | 1221 | | | | | 7.2.3 | 1222 | | | | | | 1223 | CANCEL_PUSH | Yes | No | No | Section | 1224 | | | | | 7.2.4 | 1225 | | | | | | 1226 | SETTINGS | Yes (1) | No | No | Section | 1227 | | | | | 7.2.5 | 1228 | | | | | | 1229 | PUSH_PROMISE | No | Yes | No | Section | 1230 | | | | | 7.2.6 | 1231 | | | | | | 1232 | GOAWAY | Yes | No | No | Section | 1233 | | | | | 7.2.7 | 1234 | | | | | | 1235 | MAX_PUSH_ID | Yes | No | No | Section | 1236 | | | | | 7.2.8 | 1237 | | | | | | 1238 | DUPLICATE_PUSH | No | Yes | No | Section | 1239 | | | | | 7.2.9 | 1240 +----------------+------------+------------+-----------+------------+ 1242 Table 1: HTTP/3 frames and stream type overview 1244 Certain frames can only occur as the first frame of a particular 1245 stream type; these are indicated in Table 1 with a (1). Specific 1246 guidance is provided in the relevant section. 1248 Note that, unlike QUIC frames, HTTP/3 frames can span multiple 1249 packets. 1251 7.1. Frame Layout 1253 All frames have the following format: 1255 0 1 2 3 1256 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 1257 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1258 | Type (i) ... 1259 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1260 | Length (i) ... 1261 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1262 | Frame Payload (*) ... 1263 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1265 Figure 4: HTTP/3 frame format 1267 A frame includes the following fields: 1269 Type: A variable-length integer that identifies the frame type. 1271 Length: A variable-length integer that describes the length of the 1272 Frame Payload. 1274 Frame Payload: A payload, the semantics of which are determined by 1275 the Type field. 1277 Each frame's payload MUST contain exactly the fields identified in 1278 its description. A frame payload that contains additional bytes 1279 after the identified fields or a frame payload that terminates before 1280 the end of the identified fields MUST be treated as a connection 1281 error of type HTTP_MALFORMED_FRAME. 1283 When a stream terminates cleanly, if the last frame on the stream was 1284 truncated, this MUST be treated as a connection error (Section 8) of 1285 type HTTP_MALFORMED_FRAME. Streams which terminate abruptly may be 1286 reset at any point in a frame. 1288 7.2. Frame Definitions 1290 7.2.1. DATA 1292 DATA frames (type=0x0) convey arbitrary, variable-length sequences of 1293 bytes associated with an HTTP request or response payload. 1295 DATA frames MUST be associated with an HTTP request or response. If 1296 a DATA frame is received on a control stream, the recipient MUST 1297 respond with a connection error (Section 8) of type 1298 HTTP_WRONG_STREAM. 1300 0 1 2 3 1301 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 1302 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1303 | Payload (*) ... 1304 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1306 Figure 5: DATA frame payload 1308 7.2.2. HEADERS 1310 The HEADERS frame (type=0x1) is used to carry a header block, 1311 compressed using QPACK. See [QPACK] for more details. 1313 0 1 2 3 1314 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 1315 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1316 | Header Block (*) ... 1317 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1319 Figure 6: HEADERS frame payload 1321 HEADERS frames can only be sent on request / push streams. If a 1322 HEADERS frame is received on a control stream, the recipient MUST 1323 respond with a connection error (Section 8) of type 1324 HTTP_WRONG_STREAM. 1326 7.2.3. PRIORITY 1328 The PRIORITY (type=0x2) frame specifies the client-advised priority 1329 of a request, server push or placeholder. 1331 A PRIORITY frame identifies an element to prioritize, and an element 1332 upon which it depends. A Prioritized ID or Dependency ID identifies 1333 a client-initiated request using the corresponding stream ID, a 1334 server push using a Push ID (see Section 7.2.6), or a placeholder 1335 using a Placeholder ID (see Section 4.3.1). 1337 In order to ensure that prioritization is processed in a consistent 1338 order, PRIORITY frames MUST be sent on the control stream. 1340 0 1 2 3 1341 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 1342 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1343 |PT |DT |X|Empty| Prioritized Element ID (i) ... 1344 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1345 | [Element Dependency ID (i)] ... 1346 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1347 | Weight (8) | 1348 +-+-+-+-+-+-+-+-+ 1350 Figure 7: PRIORITY frame payload 1352 The PRIORITY frame payload has the following fields: 1354 PT (Prioritized Element Type): A two-bit field indicating the type 1355 of element being prioritized (see Table 2). This MUST NOT be set 1356 to "11". 1358 DT (Element Dependency Type): A two-bit field indicating the type of 1359 element being depended on (see Table 2). 1361 X (Exclusive Flag): A single-bit flag indicating that the dependency 1362 is exclusive (see Section 4.3). 1364 Empty: A three-bit field which MUST be zero when sent and has no 1365 semantic value on receipt. 1367 Prioritized Element ID: A variable-length integer that identifies 1368 the element being prioritized. Depending on the value of 1369 Prioritized Type, this contains the Stream ID of a request stream, 1370 the Push ID of a promised resource, or a Placeholder ID of a 1371 placeholder. 1373 Element Dependency ID: A variable-length integer that identifies the 1374 element on which a dependency is being expressed. Depending on 1375 the value of Dependency Type, this contains the Stream ID of a 1376 request stream, the Push ID of a promised resource, the 1377 Placeholder ID of a placeholder, or is absent. For details of 1378 dependencies, see Section 4.3 and [HTTP2], Section 5.3. 1380 Weight: An unsigned 8-bit integer representing a priority weight for 1381 the prioritized element (see [HTTP2], Section 5.3). Add one to 1382 the value to obtain a weight between 1 and 256. 1384 The values for the Prioritized Element Type and Element Dependency 1385 Type (Table 2) imply the interpretation of the associated Element ID 1386 fields. 1388 +-----------+------------------+---------------------+ 1389 | Type Bits | Type Description | Element ID Contents | 1390 +-----------+------------------+---------------------+ 1391 | 00 | Request stream | Stream ID | 1392 | | | | 1393 | 01 | Push stream | Push ID | 1394 | | | | 1395 | 10 | Placeholder | Placeholder ID | 1396 | | | | 1397 | 11 | Root of the tree | Absent | 1398 +-----------+------------------+---------------------+ 1400 Table 2: Element Types of a PRIORITY frame 1402 Note that unlike in [HTTP2], the root of the tree cannot be 1403 referenced using a Stream ID of 0, as in QUIC stream 0 carries a 1404 valid HTTP request. The root of the tree cannot be reprioritized. 1406 The PRIORITY frame can express relationships which might not be 1407 permitted based on the stream on which it is sent or its position in 1408 the stream. These situations MUST be treated as a connection error 1409 of type HTTP_MALFORMED_FRAME. The following situations are examples 1410 of invalid PRIORITY frames: 1412 o A PRIORITY frame with the Prioritized Element Type set to "11". 1414 o A PRIORITY frame which claims to reference a request, but the 1415 associated ID does not identify a client-initiated bidirectional 1416 stream 1418 A PRIORITY frame with Empty bits not set to zero MAY be treated as a 1419 connection error of type HTTP_MALFORMED_FRAME. 1421 A PRIORITY frame that references a non-existent Push ID, a 1422 Placeholder ID greater than the server's limit, or a Stream ID the 1423 client is not yet permitted to open MUST be treated as a connection 1424 error of type HTTP_ID_ERROR. 1426 A PRIORITY frame received on any stream other than the control stream 1427 MUST be treated as a connection error of type HTTP_WRONG_STREAM. 1429 PRIORITY frames received by a client MUST be treated as a connection 1430 error of type HTTP_UNEXPECTED_FRAME. 1432 7.2.4. CANCEL_PUSH 1434 The CANCEL_PUSH frame (type=0x3) is used to request cancellation of a 1435 server push prior to the push stream being received. The CANCEL_PUSH 1436 frame identifies a server push by Push ID (see Section 7.2.6), 1437 encoded as a variable-length integer. 1439 When a server receives this frame, it aborts sending the response for 1440 the identified server push. If the server has not yet started to 1441 send the server push, it can use the receipt of a CANCEL_PUSH frame 1442 to avoid opening a push stream. If the push stream has been opened 1443 by the server, the server SHOULD send a QUIC RESET_STREAM frame on 1444 that stream and cease transmission of the response. 1446 A server can send the CANCEL_PUSH frame to indicate that it will not 1447 be fulfilling a promise prior to creation of a push stream. Once the 1448 push stream has been created, sending CANCEL_PUSH has no effect on 1449 the state of the push stream. A QUIC RESET_STREAM frame SHOULD be 1450 used instead to abort transmission of the server push response. 1452 A CANCEL_PUSH frame is sent on the control stream. Receiving a 1453 CANCEL_PUSH frame on a stream other than the control stream MUST be 1454 treated as a connection error of type HTTP_WRONG_STREAM. 1456 0 1 2 3 1457 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 1458 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1459 | Push ID (i) ... 1460 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1462 Figure 8: CANCEL_PUSH frame payload 1464 The CANCEL_PUSH frame carries a Push ID encoded as a variable-length 1465 integer. The Push ID identifies the server push that is being 1466 cancelled (see Section 7.2.6). 1468 If the client receives a CANCEL_PUSH frame, that frame might identify 1469 a Push ID that has not yet been mentioned by a PUSH_PROMISE frame. 1471 7.2.5. SETTINGS 1473 The SETTINGS frame (type=0x4) conveys configuration parameters that 1474 affect how endpoints communicate, such as preferences and constraints 1475 on peer behavior. Individually, a SETTINGS parameter can also be 1476 referred to as a "setting"; the identifier and value of each setting 1477 parameter can be referred to as a "setting identifier" and a "setting 1478 value". 1480 SETTINGS frames always apply to a connection, never a single stream. 1481 A SETTINGS frame MUST be sent as the first frame of each control 1482 stream (see Section 6.2.1) by each peer, and MUST NOT be sent 1483 subsequently. If an endpoint receives a second SETTINGS frame on the 1484 control stream, the endpoint MUST respond with a connection error of 1485 type HTTP_UNEXPECTED_FRAME. 1487 SETTINGS frames MUST NOT be sent on any stream other than the control 1488 stream. If an endpoint receives a SETTINGS frame on a different 1489 stream, the endpoint MUST respond with a connection error of type 1490 HTTP_WRONG_STREAM. 1492 SETTINGS parameters are not negotiated; they describe characteristics 1493 of the sending peer, which can be used by the receiving peer. 1494 However, a negotiation can be implied by the use of SETTINGS - each 1495 peer uses SETTINGS to advertise a set of supported values. The 1496 definition of the setting would describe how each peer combines the 1497 two sets to conclude which choice will be used. SETTINGS does not 1498 provide a mechanism to identify when the choice takes effect. 1500 Different values for the same parameter can be advertised by each 1501 peer. For example, a client might be willing to consume a very large 1502 response header, while servers are more cautious about request size. 1504 Parameters MUST NOT occur more than once in the SETTINGS frame. A 1505 receiver MAY treat the presence of the same parameter more than once 1506 as a connection error of type HTTP_SETTINGS_ERROR. 1508 The payload of a SETTINGS frame consists of zero or more parameters. 1509 Each parameter consists of a setting identifier and a value, both 1510 encoded as QUIC variable-length integers. 1512 0 1 2 3 1513 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 1514 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1515 | Identifier (i) ... 1516 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1517 | Value (i) ... 1518 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1520 Figure 9: SETTINGS parameter format 1522 An implementation MUST ignore the contents for any SETTINGS 1523 identifier it does not understand. 1525 7.2.5.1. Defined SETTINGS Parameters 1527 The following settings are defined in HTTP/3: 1529 SETTINGS_MAX_HEADER_LIST_SIZE (0x6): The default value is unlimited. 1530 See Section 4.1.1 for usage. 1532 SETTINGS_NUM_PLACEHOLDERS (0x9): The default value is 0. However, 1533 this value SHOULD be set to a non-zero value by servers. See 1534 Section 4.3.1 for usage. 1536 Setting identifiers of the format "0x1f * N + 0x21" for integer 1537 values of N are reserved to exercise the requirement that unknown 1538 identifiers be ignored. Such settings have no defined meaning. 1539 Endpoints SHOULD include at least one such setting in their SETTINGS 1540 frame. Endpoints MUST NOT consider such settings to have any meaning 1541 upon receipt. 1543 Because the setting has no defined meaning, the value of the setting 1544 can be any value the implementation selects. 1546 Additional settings can be defined by extensions to HTTP/3; see 1547 Section 9 for more details. 1549 7.2.5.2. Initialization 1551 An HTTP implementation MUST NOT send frames or requests which would 1552 be invalid based on its current understanding of the peer's settings. 1553 All settings begin at an initial value, and are updated upon receipt 1554 of a SETTINGS frame. For servers, the initial value of each client 1555 setting is the default value. 1557 For clients using a 1-RTT QUIC connection, the initial value of each 1558 server setting is the default value. When a 0-RTT QUIC connection is 1559 being used, the initial value of each server setting is the value 1560 used in the previous session. Clients MUST store the settings the 1561 server provided in the session being resumed and MUST comply with 1562 stored settings until the current server settings are received. A 1563 client can use these initial values to send requests before the 1564 server's SETTINGS frame has arrived. This removes the need for a 1565 client to wait for the SETTINGS frame before sending requests. 1567 A server can remember the settings that it advertised, or store an 1568 integrity-protected copy of the values in the ticket and recover the 1569 information when accepting 0-RTT data. A server uses the HTTP/3 1570 settings values in determining whether to accept 0-RTT data. 1572 A server MAY accept 0-RTT and subsequently provide different settings 1573 in its SETTINGS frame. If 0-RTT data is accepted by the server, its 1574 SETTINGS frame MUST NOT reduce any limits or alter any values that 1575 might be violated by the client with its 0-RTT data. The server MAY 1576 omit settings from its SETTINGS frame which are unchanged from the 1577 initial value. 1579 7.2.6. PUSH_PROMISE 1581 The PUSH_PROMISE frame (type=0x5) is used to carry a promised request 1582 header set from server to client on a request stream, as in HTTP/2. 1584 0 1 2 3 1585 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 1586 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1587 | Push ID (i) ... 1588 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1589 | Header Block (*) ... 1590 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1592 Figure 10: PUSH_PROMISE frame payload 1594 The payload consists of: 1596 Push ID: A variable-length integer that identifies the server push 1597 operation. A Push ID is used in push stream headers 1598 (Section 4.4), CANCEL_PUSH frames (Section 7.2.4), DUPLICATE_PUSH 1599 frames (Section 7.2.9), and PRIORITY frames (Section 7.2.3). 1601 Header Block: QPACK-compressed request header fields for the 1602 promised response. See [QPACK] for more details. 1604 A server MUST NOT use a Push ID that is larger than the client has 1605 provided in a MAX_PUSH_ID frame (Section 7.2.8). A client MUST treat 1606 receipt of a PUSH_PROMISE frame that contains a larger Push ID than 1607 the client has advertised as a connection error of HTTP_ID_ERROR. 1609 A server MUST NOT use the same Push ID in multiple PUSH_PROMISE 1610 frames. A client MUST treat receipt of a Push ID which has already 1611 been promised as a connection error of type HTTP_ID_ERROR. 1613 If a PUSH_PROMISE frame is received on the control stream, the client 1614 MUST respond with a connection error (Section 8) of type 1615 HTTP_WRONG_STREAM. 1617 A client MUST NOT send a PUSH_PROMISE frame. A server MUST treat the 1618 receipt of a PUSH_PROMISE frame as a connection error of type 1619 HTTP_UNEXPECTED_FRAME. 1621 See Section 4.4 for a description of the overall server push 1622 mechanism. 1624 7.2.7. GOAWAY 1626 The GOAWAY frame (type=0x7) is used to initiate graceful shutdown of 1627 a connection by a server. GOAWAY allows a server to stop accepting 1628 new requests while still finishing processing of previously received 1629 requests. This enables administrative actions, like server 1630 maintenance. GOAWAY by itself does not close a connection. 1632 0 1 2 3 1633 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 1634 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1635 | Stream ID (i) ... 1636 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1638 Figure 11: GOAWAY frame payload 1640 The GOAWAY frame is always sent on the control stream. It carries a 1641 QUIC Stream ID for a client-initiated bidirectional stream encoded as 1642 a variable-length integer. A client MUST treat receipt of a GOAWAY 1643 frame containing a Stream ID of any other type as a connection error 1644 of type HTTP_MALFORMED_FRAME. 1646 Clients do not need to send GOAWAY to initiate a graceful shutdown; 1647 they simply stop making new requests. A server MUST treat receipt of 1648 a GOAWAY frame on any stream as a connection error (Section 8) of 1649 type HTTP_UNEXPECTED_FRAME. 1651 The GOAWAY frame applies to the connection, not a specific stream. A 1652 client MUST treat a GOAWAY frame on a stream other than the control 1653 stream as a connection error (Section 8) of type HTTP_WRONG_STREAM. 1655 See Section 5.2 for more information on the use of the GOAWAY frame. 1657 7.2.8. MAX_PUSH_ID 1659 The MAX_PUSH_ID frame (type=0xD) is used by clients to control the 1660 number of server pushes that the server can initiate. This sets the 1661 maximum value for a Push ID that the server can use in a PUSH_PROMISE 1662 frame. Consequently, this also limits the number of push streams 1663 that the server can initiate in addition to the limit set by the QUIC 1664 MAX_STREAMS frame. 1666 The MAX_PUSH_ID frame is always sent on the control stream. Receipt 1667 of a MAX_PUSH_ID frame on any other stream MUST be treated as a 1668 connection error of type HTTP_WRONG_STREAM. 1670 A server MUST NOT send a MAX_PUSH_ID frame. A client MUST treat the 1671 receipt of a MAX_PUSH_ID frame as a connection error of type 1672 HTTP_UNEXPECTED_FRAME. 1674 The maximum Push ID is unset when a connection is created, meaning 1675 that a server cannot push until it receives a MAX_PUSH_ID frame. A 1676 client that wishes to manage the number of promised server pushes can 1677 increase the maximum Push ID by sending MAX_PUSH_ID frames as the 1678 server fulfills or cancels server pushes. 1680 0 1 2 3 1681 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 1682 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1683 | Push ID (i) ... 1684 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1686 Figure 12: MAX_PUSH_ID frame payload 1688 The MAX_PUSH_ID frame carries a single variable-length integer that 1689 identifies the maximum value for a Push ID that the server can use 1690 (see Section 7.2.6). A MAX_PUSH_ID frame cannot reduce the maximum 1691 Push ID; receipt of a MAX_PUSH_ID that contains a smaller value than 1692 previously received MUST be treated as a connection error of type 1693 HTTP_ID_ERROR. 1695 7.2.9. DUPLICATE_PUSH 1697 The DUPLICATE_PUSH frame (type=0xE) is used by servers to indicate 1698 that an existing pushed resource is related to multiple client 1699 requests. 1701 The DUPLICATE_PUSH frame is always sent on a request stream. Receipt 1702 of a DUPLICATE_PUSH frame on any other stream MUST be treated as a 1703 connection error of type HTTP_WRONG_STREAM. 1705 A client MUST NOT send a DUPLICATE_PUSH frame. A server MUST treat 1706 the receipt of a DUPLICATE_PUSH frame as a connection error of type 1707 HTTP_UNEXPECTED_FRAME. 1709 0 1 2 3 1710 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 1711 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1712 | Push ID (i) ... 1713 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1715 Figure 13: DUPLICATE_PUSH frame payload 1717 The DUPLICATE_PUSH frame carries a single variable-length integer 1718 that identifies the Push ID of a resource that the server has 1719 previously promised (see Section 7.2.6), though that promise might 1720 not be received before this frame. A server MUST NOT use a Push ID 1721 that is larger than the client has provided in a MAX_PUSH_ID frame 1722 (Section 7.2.8). A client MUST treat receipt of a DUPLICATE_PUSH 1723 that contains a larger Push ID than the client has advertised as a 1724 connection error of type HTTP_ID_ERROR. 1726 This frame allows the server to use the same server push in response 1727 to multiple concurrent requests. Referencing the same server push 1728 ensures that a promise can be made in relation to every response in 1729 which server push might be needed without duplicating request headers 1730 or pushed responses. 1732 Allowing duplicate references to the same Push ID is primarily to 1733 reduce duplication caused by concurrent requests. A server SHOULD 1734 avoid reusing a Push ID over a long period. Clients are likely to 1735 consume server push responses and not retain them for reuse over 1736 time. Clients that see a DUPLICATE_PUSH that uses a Push ID that 1737 they have since consumed and discarded are forced to ignore the 1738 DUPLICATE_PUSH. 1740 7.2.10. Reserved Frame Types 1742 Frame types of the format "0x1f * N + 0x21" for integer values of N 1743 are reserved to exercise the requirement that unknown types be 1744 ignored (Section 9). These frames have no semantics, and can be sent 1745 when application-layer padding is desired. They MAY also be sent on 1746 connections where no data is currently being transferred. Endpoints 1747 MUST NOT consider these frames to have any meaning upon receipt. 1749 The payload and length of the frames are selected in any manner the 1750 implementation chooses. 1752 8. Error Handling 1754 QUIC allows the application to abruptly terminate (reset) individual 1755 streams or the entire connection when an error is encountered. These 1756 are referred to as "stream errors" or "connection errors" and are 1757 described in more detail in [QUIC-TRANSPORT]. An endpoint MAY choose 1758 to treat a stream error as a connection error. 1760 This section describes HTTP/3-specific error codes which can be used 1761 to express the cause of a connection or stream error. 1763 8.1. HTTP/3 Error Codes 1765 The following error codes are defined for use in QUIC RESET_STREAM 1766 frames, STOP_SENDING frames, and CONNECTION_CLOSE frames when using 1767 HTTP/3. 1769 HTTP_NO_ERROR (0x00): No error. This is used when the connection or 1770 stream needs to be closed, but there is no error to signal. 1772 HTTP_GENERAL_PROTOCOL_ERROR (0x01): Peer violated protocol 1773 requirements in a way which doesn't match a more specific error 1774 code, or endpoint declines to use the more specific error code. 1776 Reserved (0x02): This code is reserved and has no meaning. 1778 HTTP_INTERNAL_ERROR (0x03): An internal error has occurred in the 1779 HTTP stack. 1781 Reserved (0x04): This code is reserved and has no meaning. 1783 HTTP_REQUEST_CANCELLED (0x05): The request or its response 1784 (including pushed response) is cancelled. 1786 HTTP_INCOMPLETE_REQUEST (0x06): The client's stream terminated 1787 without containing a fully-formed request. 1789 HTTP_CONNECT_ERROR (0x07): The connection established in response to 1790 a CONNECT request was reset or abnormally closed. 1792 HTTP_EXCESSIVE_LOAD (0x08): The endpoint detected that its peer is 1793 exhibiting a behavior that might be generating excessive load. 1795 HTTP_VERSION_FALLBACK (0x09): The requested operation cannot be 1796 served over HTTP/3. The peer should retry over HTTP/1.1. 1798 HTTP_WRONG_STREAM (0x0A): A frame was received on a stream where it 1799 is not permitted. 1801 HTTP_ID_ERROR (0x0B): A Stream ID, Push ID, or Placeholder ID was 1802 used incorrectly, such as exceeding a limit, reducing a limit, or 1803 being reused. 1805 Reserved (0x0C): N/A 1807 HTTP_STREAM_CREATION_ERROR (0x0D): The endpoint detected that its 1808 peer created a stream that it will not accept. 1810 Reserved (0x0E): N/A 1811 HTTP_CLOSED_CRITICAL_STREAM (0x0F): A stream required by the 1812 connection was closed or reset. 1814 Reserved (0x0010): N/A 1816 HTTP_EARLY_RESPONSE (0x0011): The remainder of the client's request 1817 is not needed to produce a response. For use in STOP_SENDING 1818 only. 1820 HTTP_MISSING_SETTINGS (0x0012): No SETTINGS frame was received at 1821 the beginning of the control stream. 1823 HTTP_UNEXPECTED_FRAME (0x0013): A frame was received which was not 1824 permitted in the current state. 1826 HTTP_REQUEST_REJECTED (0x0014): A server rejected a request without 1827 performing any application processing. 1829 HTTP_SETTINGS_ERROR (0x00FF): An endpoint detected an error in the 1830 payload of a SETTINGS frame: a duplicate setting was detected, a 1831 client-only setting was sent by a server, or a server-only setting 1832 by a client. 1834 HTTP_MALFORMED_FRAME (0x01XX): An error in a specific frame type. 1835 If the frame type is "0xfe" or less, the type is included as the 1836 last byte of the error code. For example, an error in a 1837 MAX_PUSH_ID frame would be indicated with the code (0x10D). The 1838 last byte "0xff" is used to indicate any frame type greater than 1839 "0xfe". 1841 9. Extensions to HTTP/3 1843 HTTP/3 permits extension of the protocol. Within the limitations 1844 described in this section, protocol extensions can be used to provide 1845 additional services or alter any aspect of the protocol. Extensions 1846 are effective only within the scope of a single HTTP/3 connection. 1848 This applies to the protocol elements defined in this document. This 1849 does not affect the existing options for extending HTTP, such as 1850 defining new methods, status codes, or header fields. 1852 Extensions are permitted to use new frame types (Section 7.2), new 1853 settings (Section 7.2.5.1), new error codes (Section 8), or new 1854 unidirectional stream types (Section 6.2). Registries are 1855 established for managing these extension points: frame types 1856 (Section 11.3), settings (Section 11.4), error codes (Section 11.5), 1857 and stream types (Section 11.6). 1859 Implementations MUST ignore unknown or unsupported values in all 1860 extensible protocol elements. Implementations MUST discard frames 1861 and unidirectional streams that have unknown or unsupported types. 1862 This means that any of these extension points can be safely used by 1863 extensions without prior arrangement or negotiation. 1865 Extensions that could change the semantics of existing protocol 1866 components MUST be negotiated before being used. For example, an 1867 extension that changes the layout of the HEADERS frame cannot be used 1868 until the peer has given a positive signal that this is acceptable. 1869 In this case, it could also be necessary to coordinate when the 1870 revised layout comes into effect. 1872 This document doesn't mandate a specific method for negotiating the 1873 use of an extension but notes that a setting (Section 7.2.5.1) could 1874 be used for that purpose. If both peers set a value that indicates 1875 willingness to use the extension, then the extension can be used. If 1876 a setting is used for extension negotiation, the default value MUST 1877 be defined in such a fashion that the extension is disabled if the 1878 setting is omitted. 1880 10. Security Considerations 1882 The security considerations of HTTP/3 should be comparable to those 1883 of HTTP/2 with TLS. Note that where HTTP/2 employs PADDING frames 1884 and Padding fields in other frames to make a connection more 1885 resistant to traffic analysis, HTTP/3 can rely on QUIC PADDING frames 1886 or employ the reserved frame and stream types discussed in 1887 Section 7.2.10 and Section 6.2.3. 1889 When HTTP Alternative Services is used for discovery for HTTP/3 1890 endpoints, the security considerations of [ALTSVC] also apply. 1892 Several protocol elements contain nested length elements, typically 1893 in the form of frames with an explicit length containing variable- 1894 length integers. This could pose a security risk to an incautious 1895 implementer. An implementation MUST ensure that the length of a 1896 frame exactly matches the length of the fields it contains. 1898 The use of 0-RTT with HTTP/3 creates an exposure to replay attack. 1899 The anti-replay mitigations in [HTTP-REPLAY] MUST be applied when 1900 using HTTP/3 with 0-RTT. 1902 Certain HTTP implementations use the client address for logging or 1903 access-control purposes. Since a QUIC client's address might change 1904 during a connection (and future versions might support simultaneous 1905 use of multiple addresses), such implementations will need to either 1906 actively retrieve the client's current address or addresses when they 1907 are relevant or explicitly accept that the original address might 1908 change. 1910 11. IANA Considerations 1912 11.1. Registration of HTTP/3 Identification String 1914 This document creates a new registration for the identification of 1915 HTTP/3 in the "Application Layer Protocol Negotiation (ALPN) Protocol 1916 IDs" registry established in [RFC7301]. 1918 The "h3" string identifies HTTP/3: 1920 Protocol: HTTP/3 1922 Identification Sequence: 0x68 0x33 ("h3") 1924 Specification: This document 1926 11.2. Registration of QUIC Version Hint Alt-Svc Parameter 1928 This document creates a new registration for version-negotiation 1929 hints in the "Hypertext Transfer Protocol (HTTP) Alt-Svc Parameter" 1930 registry established in [RFC7838]. 1932 Parameter: "quic" 1934 Specification: This document, Section 3.2.1 1936 11.3. Frame Types 1938 This document establishes a registry for HTTP/3 frame type codes. 1939 The "HTTP/3 Frame Type" registry governs a 62-bit space. This space 1940 is split into three spaces that are governed by different policies. 1941 Values between "0x00" and "0x3f" (in hexadecimal) are assigned via 1942 the Standards Action or IESG Review policies [RFC8126]. Values from 1943 "0x40" to "0x3fff" operate on the Specification Required policy 1944 [RFC8126]. All other values are assigned to Private Use [RFC8126]. 1946 While this registry is separate from the "HTTP/2 Frame Type" registry 1947 defined in [HTTP2], it is preferable that the assignments parallel 1948 each other where the code spaces overlap. If an entry is present in 1949 only one registry, every effort SHOULD be made to avoid assigning the 1950 corresponding value to an unrelated operation. 1952 New entries in this registry require the following information: 1954 Frame Type: A name or label for the frame type. 1956 Code: The 62-bit code assigned to the frame type. 1958 Specification: A reference to a specification that includes a 1959 description of the frame layout and its semantics, including any 1960 parts of the frame that are conditionally present. 1962 The entries in the following table are registered by this document. 1964 +----------------+------+---------------+ 1965 | Frame Type | Code | Specification | 1966 +----------------+------+---------------+ 1967 | DATA | 0x0 | Section 7.2.1 | 1968 | | | | 1969 | HEADERS | 0x1 | Section 7.2.2 | 1970 | | | | 1971 | PRIORITY | 0x2 | Section 7.2.3 | 1972 | | | | 1973 | CANCEL_PUSH | 0x3 | Section 7.2.4 | 1974 | | | | 1975 | SETTINGS | 0x4 | Section 7.2.5 | 1976 | | | | 1977 | PUSH_PROMISE | 0x5 | Section 7.2.6 | 1978 | | | | 1979 | Reserved | 0x6 | N/A | 1980 | | | | 1981 | GOAWAY | 0x7 | Section 7.2.7 | 1982 | | | | 1983 | Reserved | 0x8 | N/A | 1984 | | | | 1985 | Reserved | 0x9 | N/A | 1986 | | | | 1987 | MAX_PUSH_ID | 0xD | Section 7.2.8 | 1988 | | | | 1989 | DUPLICATE_PUSH | 0xE | Section 7.2.9 | 1990 +----------------+------+---------------+ 1992 Additionally, each code of the format "0x1f * N + 0x21" for integer 1993 values of N (that is, "0x21", "0x40", ..., through 1994 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 1996 11.4. Settings Parameters 1998 This document establishes a registry for HTTP/3 settings. The 1999 "HTTP/3 Settings" registry governs a 62-bit space. This space is 2000 split into three spaces that are governed by different policies. 2001 Values between "0x00" and "0x3f" (in hexadecimal) are assigned via 2002 the Standards Action or IESG Review policies [RFC8126]. Values from 2003 "0x40" to "0x3fff" operate on the Specification Required policy 2005 [RFC8126]. All other values are assigned to Private Use [RFC8126]. 2006 The designated experts are the same as those for the "HTTP/2 2007 Settings" registry defined in [HTTP2]. 2009 While this registry is separate from the "HTTP/2 Settings" registry 2010 defined in [HTTP2], it is preferable that the assignments parallel 2011 each other. If an entry is present in only one registry, every 2012 effort SHOULD be made to avoid assigning the corresponding value to 2013 an unrelated operation. 2015 New registrations are advised to provide the following information: 2017 Name: A symbolic name for the setting. Specifying a setting name is 2018 optional. 2020 Code: The 62-bit code assigned to the setting. 2022 Specification: An optional reference to a specification that 2023 describes the use of the setting. 2025 The entries in the following table are registered by this document. 2027 +----------------------+------+-----------------+ 2028 | Setting Name | Code | Specification | 2029 +----------------------+------+-----------------+ 2030 | Reserved | 0x2 | N/A | 2031 | | | | 2032 | Reserved | 0x3 | N/A | 2033 | | | | 2034 | Reserved | 0x4 | N/A | 2035 | | | | 2036 | Reserved | 0x5 | N/A | 2037 | | | | 2038 | MAX_HEADER_LIST_SIZE | 0x6 | Section 7.2.5.1 | 2039 | | | | 2040 | NUM_PLACEHOLDERS | 0x9 | Section 7.2.5.1 | 2041 +----------------------+------+-----------------+ 2043 Additionally, each code of the format "0x1f * N + 0x21" for integer 2044 values of N (that is, "0x21", "0x40", ..., through 2045 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 2047 11.5. Error Codes 2049 This document establishes a registry for HTTP/3 error codes. The 2050 "HTTP/3 Error Code" registry manages a 62-bit space. The "HTTP/3 2051 Error Code" registry operates under the "Expert Review" policy 2052 [RFC8126]. 2054 Registrations for error codes are required to include a description 2055 of the error code. An expert reviewer is advised to examine new 2056 registrations for possible duplication with existing error codes. 2057 Use of existing registrations is to be encouraged, but not mandated. 2059 New registrations are advised to provide the following information: 2061 Name: A name for the error code. Specifying an error code name is 2062 optional. 2064 Code: The 62-bit error code value. 2066 Description: A brief description of the error code semantics, longer 2067 if no detailed specification is provided. 2069 Specification: An optional reference for a specification that 2070 defines the error code. 2072 The entries in the following table are registered by this document. 2074 +----------------------------+--------+-------------+---------------+ 2075 | Name | Code | Description | Specification | 2076 +----------------------------+--------+-------------+---------------+ 2077 | HTTP_NO_ERROR | 0x0000 | No error | Section 8.1 | 2078 | | | | | 2079 | HTTP_GENERAL_PROTOCOL_ERRO | 0x0001 | General | Section 8.1 | 2080 | R | | protocol | | 2081 | | | error | | 2082 | | | | | 2083 | Reserved | 0x0002 | N/A | N/A | 2084 | | | | | 2085 | HTTP_INTERNAL_ERROR | 0x0003 | Internal | Section 8.1 | 2086 | | | error | | 2087 | | | | | 2088 | Reserved | 0x0004 | N/A | N/A | 2089 | | | | | 2090 | HTTP_REQUEST_CANCELLED | 0x0005 | Data no | Section 8.1 | 2091 | | | longer | | 2092 | | | needed | | 2093 | | | | | 2094 | HTTP_INCOMPLETE_REQUEST | 0x0006 | Stream | Section 8.1 | 2095 | | | terminated | | 2096 | | | early | | 2097 | | | | | 2098 | HTTP_CONNECT_ERROR | 0x0007 | TCP reset | Section 8.1 | 2099 | | | or error on | | 2100 | | | CONNECT | | 2101 | | | request | | 2102 | | | | | 2103 | HTTP_EXCESSIVE_LOAD | 0x0008 | Peer | Section 8.1 | 2104 | | | generating | | 2105 | | | excessive | | 2106 | | | load | | 2107 | | | | | 2108 | HTTP_VERSION_FALLBACK | 0x0009 | Retry over | Section 8.1 | 2109 | | | HTTP/1.1 | | 2110 | | | | | 2111 | HTTP_WRONG_STREAM | 0x000A | A frame was | Section 8.1 | 2112 | | | sent on the | | 2113 | | | wrong | | 2114 | | | stream | | 2115 | | | | | 2116 | HTTP_ID_ERROR | 0x000B | An | Section 8.1 | 2117 | | | identifier | | 2118 | | | was used | | 2119 | | | incorrectly | | 2120 | | | | | 2121 | Reserved | 0x000C | N/A | N/A | 2122 | | | | | 2123 | HTTP_STREAM_CREATION_ERROR | 0x000D | Stream | Section 8.1 | 2124 | | | creation | | 2125 | | | error | | 2126 | | | | | 2127 | Reserved | 0x000E | N/A | N/A | 2128 | | | | | 2129 | HTTP_CLOSED_CRITICAL_STREA | 0x000F | Critical | Section 8.1 | 2130 | M | | stream was | | 2131 | | | closed | | 2132 | | | | | 2133 | Reserved | 0x000E | N/A | N/A | 2134 | | | | | 2135 | HTTP_EARLY_RESPONSE | 0x0011 | Remainder | Section 8.1 | 2136 | | | of request | | 2137 | | | not needed | | 2138 | | | | | 2139 | HTTP_MISSING_SETTINGS | 0x0012 | No SETTINGS | Section 8.1 | 2140 | | | frame | | 2141 | | | received | | 2142 | | | | | 2143 | HTTP_UNEXPECTED_FRAME | 0x0013 | Frame not | Section 8.1 | 2144 | | | permitted | | 2145 | | | in the | | 2146 | | | current | | 2147 | | | state | | 2148 | | | | | 2149 | HTTP_REQUEST_REJECTED | 0x0014 | Request not | Section 8.1 | 2150 | | | processed | | 2151 | | | | | 2152 | HTTP_MALFORMED_FRAME | 0x01XX | Error in | Section 8.1 | 2153 | | | frame | | 2154 | | | formatting | | 2155 | | | | | 2156 | HTTP_SETTINGS_ERROR | 0x00FF | SETTINGS | Section 8.1 | 2157 | | | frame | | 2158 | | | contained | | 2159 | | | invalid | | 2160 | | | values | | 2161 +----------------------------+--------+-------------+---------------+ 2163 11.6. Stream Types 2165 This document establishes a registry for HTTP/3 unidirectional stream 2166 types. The "HTTP/3 Stream Type" registry governs a 62-bit space. 2167 This space is split into three spaces that are governed by different 2168 policies. Values between "0x00" and 0x3f (in hexadecimal) are 2169 assigned via the Standards Action or IESG Review policies [RFC8126]. 2170 Values from "0x40" to "0x3fff" operate on the Specification Required 2171 policy [RFC8126]. All other values are assigned to Private Use 2172 [RFC8126]. 2174 New entries in this registry require the following information: 2176 Stream Type: A name or label for the stream type. 2178 Code: The 62-bit code assigned to the stream type. 2180 Specification: A reference to a specification that includes a 2181 description of the stream type, including the layout semantics of 2182 its payload. 2184 Sender: Which endpoint on a connection may initiate a stream of this 2185 type. Values are "Client", "Server", or "Both". 2187 The entries in the following table are registered by this document. 2189 +----------------+------+---------------+--------+ 2190 | Stream Type | Code | Specification | Sender | 2191 +----------------+------+---------------+--------+ 2192 | Control Stream | 0x00 | Section 6.2.1 | Both | 2193 | | | | | 2194 | Push Stream | 0x01 | Section 4.4 | Server | 2195 +----------------+------+---------------+--------+ 2197 Additionally, each code of the format "0x1f * N + 0x21" for integer 2198 values of N (that is, "0x21", "0x40", ..., through 2199 "0x3FFFFFFFFFFFFFFE") MUST NOT be assigned by IANA. 2201 12. References 2203 12.1. Normative References 2205 [ALTSVC] Nottingham, M., McManus, P., and J. Reschke, "HTTP 2206 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 2207 April 2016, . 2209 [HTTP-REPLAY] 2210 Thomson, M., Nottingham, M., and W. Tarreau, "Using Early 2211 Data in HTTP", RFC 8470, DOI 10.17487/RFC8470, September 2212 2018, . 2214 [HTTP2] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 2215 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 2216 DOI 10.17487/RFC7540, May 2015, 2217 . 2219 [QPACK] Krasic, C., Bishop, M., and A. Frindell, Ed., "QPACK: 2220 Header Compression for HTTP over QUIC", draft-ietf-quic- 2221 qpack-09 (work in progress), July 2019. 2223 [QUIC-TRANSPORT] 2224 Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based 2225 Multiplexed and Secure Transport", draft-ietf-quic- 2226 transport-20 (work in progress), July 2019. 2228 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 2229 RFC 793, DOI 10.17487/RFC0793, September 1981, 2230 . 2232 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2233 Requirement Levels", BCP 14, RFC 2119, 2234 DOI 10.17487/RFC2119, March 1997, 2235 . 2237 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 2238 Specifications: ABNF", STD 68, RFC 5234, 2239 DOI 10.17487/RFC5234, January 2008, 2240 . 2242 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 2243 Extensions: Extension Definitions", RFC 6066, 2244 DOI 10.17487/RFC6066, January 2011, 2245 . 2247 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2248 Protocol (HTTP/1.1): Message Syntax and Routing", 2249 RFC 7230, DOI 10.17487/RFC7230, June 2014, 2250 . 2252 [RFC7231] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2253 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2254 DOI 10.17487/RFC7231, June 2014, 2255 . 2257 [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext 2258 Transfer Protocol Version 2 (HTTP/2)", RFC 7540, 2259 DOI 10.17487/RFC7540, May 2015, 2260 . 2262 [RFC7838] Nottingham, M., McManus, P., and J. Reschke, "HTTP 2263 Alternative Services", RFC 7838, DOI 10.17487/RFC7838, 2264 April 2016, . 2266 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 2267 Writing an IANA Considerations Section in RFCs", BCP 26, 2268 RFC 8126, DOI 10.17487/RFC8126, June 2017, 2269 . 2271 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2272 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 2273 May 2017, . 2275 12.2. Informative References 2277 [HPACK] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2278 Protocol (HTTP/1.1): Semantics and Content", RFC 7231, 2279 DOI 10.17487/RFC7231, June 2014, 2280 . 2282 [RFC6585] Nottingham, M. and R. Fielding, "Additional HTTP Status 2283 Codes", RFC 6585, DOI 10.17487/RFC6585, April 2012, 2284 . 2286 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 2287 "Transport Layer Security (TLS) Application-Layer Protocol 2288 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 2289 July 2014, . 2291 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 2292 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 2293 . 2295 12.3. URIs 2297 [1] https://mailarchive.ietf.org/arch/search/?email_list=quic 2299 [2] https://github.com/quicwg 2301 [3] https://github.com/quicwg/base-drafts/labels/-http 2303 [4] https://www.iana.org/assignments/message-headers 2305 Appendix A. Considerations for Transitioning from HTTP/2 2307 HTTP/3 is strongly informed by HTTP/2, and bears many similarities. 2308 This section describes the approach taken to design HTTP/3, points 2309 out important differences from HTTP/2, and describes how to map 2310 HTTP/2 extensions into HTTP/3. 2312 HTTP/3 begins from the premise that similarity to HTTP/2 is 2313 preferable, but not a hard requirement. HTTP/3 departs from HTTP/2 2314 where QUIC differs from TCP, either to take advantage of QUIC 2315 features (like streams) or to accommodate important shortcomings 2316 (such as a lack of total ordering). These differences make HTTP/3 2317 similar to HTTP/2 in key aspects, such as the relationship of 2318 requests and responses to streams. However, the details of the 2319 HTTP/3 design are substantially different than HTTP/2. 2321 These departures are noted in this section. 2323 A.1. Streams 2325 HTTP/3 permits use of a larger number of streams (2^62-1) than 2326 HTTP/2. The considerations about exhaustion of stream identifier 2327 space apply, though the space is significantly larger such that it is 2328 likely that other limits in QUIC are reached first, such as the limit 2329 on the connection flow control window. 2331 A.2. HTTP Frame Types 2333 Many framing concepts from HTTP/2 can be elided on QUIC, because the 2334 transport deals with them. Because frames are already on a stream, 2335 they can omit the stream number. Because frames do not block 2336 multiplexing (QUIC's multiplexing occurs below this layer), the 2337 support for variable-maximum-length packets can be removed. Because 2338 stream termination is handled by QUIC, an END_STREAM flag is not 2339 required. This permits the removal of the Flags field from the 2340 generic frame layout. 2342 Frame payloads are largely drawn from [HTTP2]. However, QUIC 2343 includes many features (e.g., flow control) which are also present in 2344 HTTP/2. In these cases, the HTTP mapping does not re-implement them. 2345 As a result, several HTTP/2 frame types are not required in HTTP/3. 2346 Where an HTTP/2-defined frame is no longer used, the frame ID has 2347 been reserved in order to maximize portability between HTTP/2 and 2348 HTTP/3 implementations. However, even equivalent frames between the 2349 two mappings are not identical. 2351 Many of the differences arise from the fact that HTTP/2 provides an 2352 absolute ordering between frames across all streams, while QUIC 2353 provides this guarantee on each stream only. As a result, if a frame 2354 type makes assumptions that frames from different streams will still 2355 be received in the order sent, HTTP/3 will break them. 2357 Some examples of feature adaptations are described below, as well as 2358 general guidance to extension frame implementors converting an HTTP/2 2359 extension to HTTP/3. 2361 A.2.1. Prioritization Differences 2363 HTTP/2 specifies priority assignments in PRIORITY frames and 2364 (optionally) in HEADERS frames. Implicit in the HTTP/2 2365 prioritization scheme is the notion of in-order delivery of priority 2366 changes (i.e., dependency tree mutations). Since operations on the 2367 dependency tree such as reparenting a subtree are not commutative, 2368 both sender and receiver must apply them in the same order to ensure 2369 that both sides have a consistent view of the stream dependency tree. 2371 To achieve in-order delivery of priority changes in HTTP/3, PRIORITY 2372 frames are sent on the control stream. HTTP/3 permits the 2373 prioritization of requests, pushes and placeholders that each exist 2374 in separate identifier spaces. The HTTP/3 PRIORITY frame replaces 2375 the stream dependency field with fields that can identify the element 2376 of interest and its dependency. 2378 A.2.2. Header Compression Differences 2380 HPACK was designed with the assumption of in-order delivery. A 2381 sequence of encoded header blocks must arrive (and be decoded) at an 2382 endpoint in the same order in which they were encoded. This ensures 2383 that the dynamic state at the two endpoints remains in sync. 2385 Because this total ordering is not provided by QUIC, HTTP/3 uses a 2386 modified version of HPACK, called QPACK. QPACK uses a single 2387 unidirectional stream to make all modifications to the dynamic table, 2388 ensuring a total order of updates. All frames which contain encoded 2389 headers merely reference the table state at a given time without 2390 modifying it. 2392 [QPACK] provides additional details. 2394 A.2.3. Guidance for New Frame Type Definitions 2396 Frame type definitions in HTTP/3 often use the QUIC variable-length 2397 integer encoding. In particular, Stream IDs use this encoding, which 2398 allows for a larger range of possible values than the encoding used 2399 in HTTP/2. Some frames in HTTP/3 use an identifier rather than a 2400 Stream ID (e.g. Push IDs in PRIORITY frames). Redefinition of the 2401 encoding of extension frame types might be necessary if the encoding 2402 includes a Stream ID. 2404 Because the Flags field is not present in generic HTTP/3 frames, 2405 those frames which depend on the presence of flags need to allocate 2406 space for flags as part of their frame payload. 2408 Other than this issue, frame type HTTP/2 extensions are typically 2409 portable to QUIC simply by replacing Stream 0 in HTTP/2 with a 2410 control stream in HTTP/3. HTTP/3 extensions will not assume 2411 ordering, but would not be harmed by ordering, and would be portable 2412 to HTTP/2 in the same manner. 2414 A.2.4. Mapping Between HTTP/2 and HTTP/3 Frame Types 2416 DATA (0x0): Padding is not defined in HTTP/3 frames. See 2417 Section 7.2.1. 2419 HEADERS (0x1): The PRIORITY region of HEADERS is not defined in 2420 HTTP/3 frames. A separate PRIORITY frame is used in all cases. 2421 Padding is not defined in HTTP/3 frames. See Section 7.2.2. 2423 PRIORITY (0x2): As described above, the PRIORITY frame references a 2424 variety of identifiers. It is sent as the first frame on a 2425 request streams or on the control stream. See Section 7.2.3. 2427 RST_STREAM (0x3): RST_STREAM frames do not exist, since QUIC 2428 provides stream lifecycle management. The same code point is used 2429 for the CANCEL_PUSH frame (Section 7.2.4). 2431 SETTINGS (0x4): SETTINGS frames are sent only at the beginning of 2432 the connection. See Section 7.2.5 and Appendix A.3. 2434 PUSH_PROMISE (0x5): The PUSH_PROMISE does not reference a stream; 2435 instead the push stream references the PUSH_PROMISE frame using a 2436 Push ID. See Section 7.2.6. 2438 PING (0x6): PING frames do not exist, since QUIC provides equivalent 2439 functionality. 2441 GOAWAY (0x7): GOAWAY is sent only from server to client and does not 2442 contain an error code. See Section 7.2.7. 2444 WINDOW_UPDATE (0x8): WINDOW_UPDATE frames do not exist, since QUIC 2445 provides flow control. 2447 CONTINUATION (0x9): CONTINUATION frames do not exist; instead, 2448 larger HEADERS/PUSH_PROMISE frames than HTTP/2 are permitted. 2450 Frame types defined by extensions to HTTP/2 need to be separately 2451 registered for HTTP/3 if still applicable. The IDs of frames defined 2452 in [HTTP2] have been reserved for simplicity. Note that the frame 2453 type space in HTTP/3 is substantially larger (62 bits versus 8 bits), 2454 so many HTTP/3 frame types have no equivalent HTTP/2 code points. 2455 See Section 11.3. 2457 A.3. HTTP/2 SETTINGS Parameters 2459 An important difference from HTTP/2 is that settings are sent once, 2460 at the beginning of the connection, and thereafter cannot change. 2461 This eliminates many corner cases around synchronization of changes. 2463 Some transport-level options that HTTP/2 specifies via the SETTINGS 2464 frame are superseded by QUIC transport parameters in HTTP/3. The 2465 HTTP-level options that are retained in HTTP/3 have the same value as 2466 in HTTP/2. 2468 Below is a listing of how each HTTP/2 SETTINGS parameter is mapped: 2470 SETTINGS_HEADER_TABLE_SIZE: See [QPACK]. 2472 SETTINGS_ENABLE_PUSH: This is removed in favor of the MAX_PUSH_ID 2473 which provides a more granular control over server push. 2475 SETTINGS_MAX_CONCURRENT_STREAMS: QUIC controls the largest open 2476 Stream ID as part of its flow control logic. Specifying 2477 SETTINGS_MAX_CONCURRENT_STREAMS in the SETTINGS frame is an error. 2479 SETTINGS_INITIAL_WINDOW_SIZE: QUIC requires both stream and 2480 connection flow control window sizes to be specified in the 2481 initial transport handshake. Specifying 2482 SETTINGS_INITIAL_WINDOW_SIZE in the SETTINGS frame is an error. 2484 SETTINGS_MAX_FRAME_SIZE: This setting has no equivalent in HTTP/3. 2485 Specifying it in the SETTINGS frame is an error. 2487 SETTINGS_MAX_HEADER_LIST_SIZE: See Section 7.2.5.1. 2489 In HTTP/3, setting values are variable-length integers (6, 14, 30, or 2490 62 bits long) rather than fixed-length 32-bit fields as in HTTP/2. 2491 This will often produce a shorter encoding, but can produce a longer 2492 encoding for settings which use the full 32-bit space. Settings 2493 ported from HTTP/2 might choose to redefine the format of their 2494 settings to avoid using the 62-bit encoding. 2496 Settings need to be defined separately for HTTP/2 and HTTP/3. The 2497 IDs of settings defined in [HTTP2] have been reserved for simplicity. 2498 Note that the settings identifier space in HTTP/3 is substantially 2499 larger (62 bits versus 16 bits), so many HTTP/3 settings have no 2500 equivalent HTTP/2 code point. See Section 11.4. 2502 A.4. HTTP/2 Error Codes 2504 QUIC has the same concepts of "stream" and "connection" errors that 2505 HTTP/2 provides. However, there is no direct portability of HTTP/2 2506 error codes. 2508 The HTTP/2 error codes defined in Section 7 of [HTTP2] map to the 2509 HTTP/3 error codes as follows: 2511 NO_ERROR (0x0): HTTP_NO_ERROR in Section 8.1. 2513 PROTOCOL_ERROR (0x1): This is mapped to HTTP_GENERAL_PROTOCOL_ERROR 2514 except in cases where more specific error codes have been defined. 2515 This includes HTTP_MALFORMED_FRAME, HTTP_WRONG_STREAM, 2516 HTTP_UNEXPECTED_FRAME and HTTP_CLOSED_CRITICAL_STREAM defined in 2517 Section 8.1. 2519 INTERNAL_ERROR (0x2): HTTP_INTERNAL_ERROR in Section 8.1. 2521 FLOW_CONTROL_ERROR (0x3): Not applicable, since QUIC handles flow 2522 control. Would provoke a QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA 2523 from the QUIC layer. 2525 SETTINGS_TIMEOUT (0x4): Not applicable, since no acknowledgement of 2526 SETTINGS is defined. 2528 STREAM_CLOSED (0x5): Not applicable, since QUIC handles stream 2529 management. Would provoke a QUIC_STREAM_DATA_AFTER_TERMINATION 2530 from the QUIC layer. 2532 FRAME_SIZE_ERROR (0x6): HTTP_MALFORMED_FRAME error codes defined in 2533 Section 8.1. 2535 REFUSED_STREAM (0x7): HTTP_REQUEST_REJECTED (in Section 8.1) is used 2536 to indicate that a request was not processed. Otherwise, not 2537 applicable because QUIC handles stream management. A 2538 STREAM_ID_ERROR at the QUIC layer is used for streams that are 2539 improperly opened. 2541 CANCEL (0x8): HTTP_REQUEST_CANCELLED in Section 8.1. 2543 COMPRESSION_ERROR (0x9): Multiple error codes are defined in 2544 [QPACK]. 2546 CONNECT_ERROR (0xa): HTTP_CONNECT_ERROR in Section 8.1. 2548 ENHANCE_YOUR_CALM (0xb): HTTP_EXCESSIVE_LOAD in Section 8.1. 2550 INADEQUATE_SECURITY (0xc): Not applicable, since QUIC is assumed to 2551 provide sufficient security on all connections. 2553 HTTP_1_1_REQUIRED (0xd): HTTP_VERSION_FALLBACK in Section 8.1. 2555 Error codes need to be defined for HTTP/2 and HTTP/3 separately. See 2556 Section 11.5. 2558 Appendix B. Change Log 2560 *RFC Editor's Note:* Please remove this section prior to 2561 publication of a final version of this document. 2563 B.1. Since draft-ietf-quic-http-20 2565 o Prohibit closing the control stream (#2509, #2666) 2567 o Change default priority to use an orphan node (#2502, #2690) 2569 o Exclusive priorities are restored (#2754, #2781) 2571 o Restrict use of frames when using CONNECT (#2229, #2702) 2573 o Close and maybe reset streams if a connection error occurs for 2574 CONNECT (#2228, #2703) 2576 o Encourage provision of sufficient unidirectional streams for QPACK 2577 (#2100, #2529, #2762) 2579 o Allow extensions to use server-initiated bidirectional streams 2580 (#2711, #2773) 2582 o Clarify use of maximum header list size setting (#2516, #2774) 2584 o Extensive changes to error codes and conditions of their sending 2586 * Require connection errors for more error conditions (#2511, 2587 #2510) 2589 * Updated the error codes for illegal GOAWAY frames (#2714, 2590 #2707) 2592 * Specified error code for HEADERS on control stream (#2708) 2594 * Specified error code for servers receiving PUSH_PROMISE (#2709) 2596 * Specified error code for receiving DATA before HEADERS (#2715) 2598 * Describe malformed messages and their handling (#2410, #2764) 2600 * Remove HTTP_PUSH_ALREADY_IN_CACHE error (#2812, #2813) 2602 * Refactor Push ID related errors (#2818, #2820) 2604 * Rationalize HTTP/3 stream creation errors (#2821, #2822) 2606 B.2. Since draft-ietf-quic-http-19 2608 o SETTINGS_NUM_PLACEHOLDERS is 0x9 (#2443,#2530) 2610 o Non-zero bits in the Empty field of the PRIORITY frame MAY be 2611 treated as an error (#2501) 2613 B.3. Since draft-ietf-quic-http-18 2615 o Resetting streams following a GOAWAY is recommended, but not 2616 required (#2256,#2457) 2618 o Use variable-length integers throughout (#2437,#2233,#2253,#2275) 2620 * Variable-length frame types, stream types, and settings 2621 identifiers 2623 * Renumbered stream type assignments 2624 * Modified associated reserved values 2626 o Frame layout switched from Length-Type-Value to Type-Length-Value 2627 (#2395,#2235) 2629 o Specified error code for servers receiving DUPLICATE_PUSH (#2497) 2631 o Use connection error for invalid PRIORITY (#2507, #2508) 2633 B.4. Since draft-ietf-quic-http-17 2635 o HTTP_REQUEST_REJECTED is used to indicate a request can be retried 2636 (#2106, #2325) 2638 o Changed error code for GOAWAY on the wrong stream (#2231, #2343) 2640 B.5. Since draft-ietf-quic-http-16 2642 o Rename "HTTP/QUIC" to "HTTP/3" (#1973) 2644 o Changes to PRIORITY frame (#1865, #2075) 2646 * Permitted as first frame of request streams 2648 * Remove exclusive reprioritization 2650 * Changes to Prioritized Element Type bits 2652 o Define DUPLICATE_PUSH frame to refer to another PUSH_PROMISE 2653 (#2072) 2655 o Set defaults for settings, allow request before receiving SETTINGS 2656 (#1809, #1846, #2038) 2658 o Clarify message processing rules for streams that aren't closed 2659 (#1972, #2003) 2661 o Removed reservation of error code 0 and moved HTTP_NO_ERROR to 2662 this value (#1922) 2664 o Removed prohibition of zero-length DATA frames (#2098) 2666 B.6. Since draft-ietf-quic-http-15 2668 Substantial editorial reorganization; no technical changes. 2670 B.7. Since draft-ietf-quic-http-14 2672 o Recommend sensible values for QUIC transport parameters 2673 (#1720,#1806) 2675 o Define error for missing SETTINGS frame (#1697,#1808) 2677 o Setting values are variable-length integers (#1556,#1807) and do 2678 not have separate maximum values (#1820) 2680 o Expanded discussion of connection closure (#1599,#1717,#1712) 2682 o HTTP_VERSION_FALLBACK falls back to HTTP/1.1 (#1677,#1685) 2684 B.8. Since draft-ietf-quic-http-13 2686 o Reserved some frame types for grease (#1333, #1446) 2688 o Unknown unidirectional stream types are tolerated, not errors; 2689 some reserved for grease (#1490, #1525) 2691 o Require settings to be remembered for 0-RTT, prohibit reductions 2692 (#1541, #1641) 2694 o Specify behavior for truncated requests (#1596, #1643) 2696 B.9. Since draft-ietf-quic-http-12 2698 o TLS SNI extension isn't mandatory if an alternative method is used 2699 (#1459, #1462, #1466) 2701 o Removed flags from HTTP/3 frames (#1388, #1398) 2703 o Reserved frame types and settings for use in preserving 2704 extensibility (#1333, #1446) 2706 o Added general error code (#1391, #1397) 2708 o Unidirectional streams carry a type byte and are extensible 2709 (#910,#1359) 2711 o Priority mechanism now uses explicit placeholders to enable 2712 persistent structure in the tree (#441,#1421,#1422) 2714 B.10. Since draft-ietf-quic-http-11 2716 o Moved QPACK table updates and acknowledgments to dedicated streams 2717 (#1121, #1122, #1238) 2719 B.11. Since draft-ietf-quic-http-10 2721 o Settings need to be remembered when attempting and accepting 0-RTT 2722 (#1157, #1207) 2724 B.12. Since draft-ietf-quic-http-09 2726 o Selected QCRAM for header compression (#228, #1117) 2728 o The server_name TLS extension is now mandatory (#296, #495) 2730 o Specified handling of unsupported versions in Alt-Svc (#1093, 2731 #1097) 2733 B.13. Since draft-ietf-quic-http-08 2735 o Clarified connection coalescing rules (#940, #1024) 2737 B.14. Since draft-ietf-quic-http-07 2739 o Changes for integer encodings in QUIC (#595,#905) 2741 o Use unidirectional streams as appropriate (#515, #240, #281, #886) 2743 o Improvement to the description of GOAWAY (#604, #898) 2745 o Improve description of server push usage (#947, #950, #957) 2747 B.15. Since draft-ietf-quic-http-06 2749 o Track changes in QUIC error code usage (#485) 2751 B.16. Since draft-ietf-quic-http-05 2753 o Made push ID sequential, add MAX_PUSH_ID, remove 2754 SETTINGS_ENABLE_PUSH (#709) 2756 o Guidance about keep-alive and QUIC PINGs (#729) 2758 o Expanded text on GOAWAY and cancellation (#757) 2760 B.17. Since draft-ietf-quic-http-04 2762 o Cite RFC 5234 (#404) 2764 o Return to a single stream per request (#245,#557) 2766 o Use separate frame type and settings registries from HTTP/2 (#81) 2768 o SETTINGS_ENABLE_PUSH instead of SETTINGS_DISABLE_PUSH (#477) 2770 o Restored GOAWAY (#696) 2772 o Identify server push using Push ID rather than a stream ID 2773 (#702,#281) 2775 o DATA frames cannot be empty (#700) 2777 B.18. Since draft-ietf-quic-http-03 2779 None. 2781 B.19. Since draft-ietf-quic-http-02 2783 o Track changes in transport draft 2785 B.20. Since draft-ietf-quic-http-01 2787 o SETTINGS changes (#181): 2789 * SETTINGS can be sent only once at the start of a connection; no 2790 changes thereafter 2792 * SETTINGS_ACK removed 2794 * Settings can only occur in the SETTINGS frame a single time 2796 * Boolean format updated 2798 o Alt-Svc parameter changed from "v" to "quic"; format updated 2799 (#229) 2801 o Closing the connection control stream or any message control 2802 stream is a fatal error (#176) 2804 o HPACK Sequence counter can wrap (#173) 2806 o 0-RTT guidance added 2807 o Guide to differences from HTTP/2 and porting HTTP/2 extensions 2808 added (#127,#242) 2810 B.21. Since draft-ietf-quic-http-00 2812 o Changed "HTTP/2-over-QUIC" to "HTTP/QUIC" throughout (#11,#29) 2814 o Changed from using HTTP/2 framing within Stream 3 to new framing 2815 format and two-stream-per-request model (#71,#72,#73) 2817 o Adopted SETTINGS format from draft-bishop-httpbis-extended- 2818 settings-01 2820 o Reworked SETTINGS_ACK to account for indeterminate inter-stream 2821 order (#75) 2823 o Described CONNECT pseudo-method (#95) 2825 o Updated ALPN token and Alt-Svc guidance (#13,#87) 2827 o Application-layer-defined error codes (#19,#74) 2829 B.22. Since draft-shade-quic-http2-mapping-00 2831 o Adopted as base for draft-ietf-quic-http 2833 o Updated authors/editors list 2835 Acknowledgements 2837 The original authors of this specification were Robbie Shade and Mike 2838 Warres. 2840 A substantial portion of Mike's contribution was supported by 2841 Microsoft during his employment there. 2843 Author's Address 2845 Mike Bishop (editor) 2846 Akamai 2848 Email: mbishop@evequefou.be