< draft-ietf-quic-http-07.txt   draft-ietf-quic-http-08.txt >
QUIC M. Bishop, Ed. QUIC M. Bishop, Ed.
Internet-Draft Microsoft Internet-Draft Akamai
Intended status: Standards Track October 13, 2017 Intended status: Standards Track December 5, 2017
Expires: April 16, 2018 Expires: June 8, 2018
Hypertext Transfer Protocol (HTTP) over QUIC Hypertext Transfer Protocol (HTTP) over QUIC
draft-ietf-quic-http-07 draft-ietf-quic-http-08
Abstract Abstract
The QUIC transport protocol has several features that are desirable The QUIC transport protocol has several features that are desirable
in a transport for HTTP, such as stream multiplexing, per-stream flow in a transport for HTTP, such as stream multiplexing, per-stream flow
control, and low-latency connection establishment. This document control, and low-latency connection establishment. This document
describes a mapping of HTTP semantics over QUIC. This document also describes a mapping of HTTP semantics over QUIC. This document also
identifies HTTP/2 features that are subsumed by QUIC, and describes identifies HTTP/2 features that are subsumed by QUIC, and describes
how HTTP/2 extensions can be ported to QUIC. how HTTP/2 extensions can be ported to QUIC.
Note to Readers Note to Readers
Discussion of this draft takes place on the QUIC working group Discussion of this draft takes place on the QUIC working group
mailing list (quic@ietf.org), which is archived at mailing list (quic@ietf.org), which is archived at
https://mailarchive.ietf.org/arch/search/?email_list=quic [1]. https://mailarchive.ietf.org/arch/search/?email_list=quic [1].
Working Group information can be found at https://github.com/quicwg Working Group information can be found at https://github.com/quicwg
[2]; source code and issues list for this draft can be found at [2]; source code and issues list for this draft can be found at
https://github.com/quicwg/base-drafts/labels/http [3]. https://github.com/quicwg/base-drafts/labels/-http [3].
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 16, 2018. This Internet-Draft will expire on June 8, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 28 skipping to change at page 2, line 28
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3
2. QUIC Advertisement . . . . . . . . . . . . . . . . . . . . . 4 2. QUIC Advertisement . . . . . . . . . . . . . . . . . . . . . 4
2.1. QUIC Version Hints . . . . . . . . . . . . . . . . . . . 4 2.1. QUIC Version Hints . . . . . . . . . . . . . . . . . . . 4
3. Connection Establishment . . . . . . . . . . . . . . . . . . 5 3. Connection Establishment . . . . . . . . . . . . . . . . . . 5
3.1. Draft Version Identification . . . . . . . . . . . . . . 5 3.1. Draft Version Identification . . . . . . . . . . . . . . 5
4. Stream Mapping and Usage . . . . . . . . . . . . . . . . . . 5 4. Stream Mapping and Usage . . . . . . . . . . . . . . . . . . 6
4.1. Stream 1: Control Stream . . . . . . . . . . . . . . . . 6 4.1. Control Streams . . . . . . . . . . . . . . . . . . . . . 7
4.2. HTTP Message Exchanges . . . . . . . . . . . . . . . . . 6 4.2. HTTP Message Exchanges . . . . . . . . . . . . . . . . . 7
4.2.1. Header Compression . . . . . . . . . . . . . . . . . 7 4.2.1. Header Compression . . . . . . . . . . . . . . . . . 8
4.2.2. The CONNECT Method . . . . . . . . . . . . . . . . . 8 4.2.2. The CONNECT Method . . . . . . . . . . . . . . . . . 8
4.3. Request Prioritization . . . . . . . . . . . . . . . . . 9 4.3. Request Prioritization . . . . . . . . . . . . . . . . . 9
4.4. Server Push . . . . . . . . . . . . . . . . . . . . . . . 9 4.4. Server Push . . . . . . . . . . . . . . . . . . . . . . . 10
5. HTTP Framing Layer . . . . . . . . . . . . . . . . . . . . . 10 5. HTTP Framing Layer . . . . . . . . . . . . . . . . . . . . . 11
5.1. Frame Layout . . . . . . . . . . . . . . . . . . . . . . 11 5.1. Frame Layout . . . . . . . . . . . . . . . . . . . . . . 11
5.2. Frame Definitions . . . . . . . . . . . . . . . . . . . . 11 5.2. Frame Definitions . . . . . . . . . . . . . . . . . . . . 12
5.2.1. DATA . . . . . . . . . . . . . . . . . . . . . . . . 11 5.2.1. DATA . . . . . . . . . . . . . . . . . . . . . . . . 12
5.2.2. HEADERS . . . . . . . . . . . . . . . . . . . . . . . 11 5.2.2. HEADERS . . . . . . . . . . . . . . . . . . . . . . . 12
5.2.3. PRIORITY . . . . . . . . . . . . . . . . . . . . . . 12 5.2.3. PRIORITY . . . . . . . . . . . . . . . . . . . . . . 12
5.2.4. CANCEL_PUSH . . . . . . . . . . . . . . . . . . . . . 13 5.2.4. CANCEL_PUSH . . . . . . . . . . . . . . . . . . . . . 14
5.2.5. SETTINGS . . . . . . . . . . . . . . . . . . . . . . 14 5.2.5. SETTINGS . . . . . . . . . . . . . . . . . . . . . . 15
5.2.6. PUSH_PROMISE . . . . . . . . . . . . . . . . . . . . 17 5.2.6. PUSH_PROMISE . . . . . . . . . . . . . . . . . . . . 17
5.2.7. GOAWAY . . . . . . . . . . . . . . . . . . . . . . . 18 5.2.7. GOAWAY . . . . . . . . . . . . . . . . . . . . . . . 18
5.2.8. MAX_PUSH_ID . . . . . . . . . . . . . . . . . . . . . 20 5.2.8. MAX_PUSH_ID . . . . . . . . . . . . . . . . . . . . . 21
6. Connection Management . . . . . . . . . . . . . . . . . . . . 20 6. Connection Management . . . . . . . . . . . . . . . . . . . . 22
7. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 21 7. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 22
7.1. HTTP/QUIC Error Codes . . . . . . . . . . . . . . . . . . 21 7.1. HTTP/QUIC Error Codes . . . . . . . . . . . . . . . . . . 22
8. Considerations for Transitioning from HTTP/2 . . . . . . . . 22 8. Considerations for Transitioning from HTTP/2 . . . . . . . . 24
8.1. HTTP Frame Types . . . . . . . . . . . . . . . . . . . . 23 8.1. Streams . . . . . . . . . . . . . . . . . . . . . . . . . 24
8.2. HTTP/2 SETTINGS Parameters . . . . . . . . . . . . . . . 25 8.2. HTTP Frame Types . . . . . . . . . . . . . . . . . . . . 24
8.3. HTTP/2 Error Codes . . . . . . . . . . . . . . . . . . . 25 8.3. HTTP/2 SETTINGS Parameters . . . . . . . . . . . . . . . 26
8.4. HTTP/2 Error Codes . . . . . . . . . . . . . . . . . . . 27
9. Security Considerations . . . . . . . . . . . . . . . . . . . 26 9. Security Considerations . . . . . . . . . . . . . . . . . . . 28
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28
10.1. Registration of HTTP/QUIC Identification String . . . . 27 10.1. Registration of HTTP/QUIC Identification String . . . . 28
10.2. Registration of QUIC Version Hint Alt-Svc Parameter . . 27 10.2. Registration of QUIC Version Hint Alt-Svc Parameter . . 28
10.3. Frame Types . . . . . . . . . . . . . . . . . . . . . . 27 10.3. Frame Types . . . . . . . . . . . . . . . . . . . . . . 29
10.4. Settings Parameters . . . . . . . . . . . . . . . . . . 28 10.4. Settings Parameters . . . . . . . . . . . . . . . . . . 30
10.5. Error Codes . . . . . . . . . . . . . . . . . . . . . . 29 10.5. Error Codes . . . . . . . . . . . . . . . . . . . . . . 31
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 34
11.1. Normative References . . . . . . . . . . . . . . . . . . 32 11.1. Normative References . . . . . . . . . . . . . . . . . . 34
11.2. Informative References . . . . . . . . . . . . . . . . . 33 11.2. Informative References . . . . . . . . . . . . . . . . . 35
11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 33 11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Appendix A. Contributors . . . . . . . . . . . . . . . . . . . . 33 Appendix A. Contributors . . . . . . . . . . . . . . . . . . . . 35
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 33 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 35
B.1. Since draft-ietf-quic-http-06 . . . . . . . . . . . . . . 33 B.1. Since draft-ietf-quic-http-07 . . . . . . . . . . . . . . 35
B.2. Since draft-ietf-quic-http-05 . . . . . . . . . . . . . . 33 B.2. Since draft-ietf-quic-http-06 . . . . . . . . . . . . . . 35
B.3. Since draft-ietf-quic-http-04 . . . . . . . . . . . . . . 33 B.3. Since draft-ietf-quic-http-05 . . . . . . . . . . . . . . 36
B.4. Since draft-ietf-quic-http-03 . . . . . . . . . . . . . . 34 B.4. Since draft-ietf-quic-http-04 . . . . . . . . . . . . . . 36
B.5. Since draft-ietf-quic-http-02 . . . . . . . . . . . . . . 34 B.5. Since draft-ietf-quic-http-03 . . . . . . . . . . . . . . 36
B.6. Since draft-ietf-quic-http-01 . . . . . . . . . . . . . . 34 B.6. Since draft-ietf-quic-http-02 . . . . . . . . . . . . . . 36
B.7. Since draft-ietf-quic-http-00 . . . . . . . . . . . . . . 35 B.7. Since draft-ietf-quic-http-01 . . . . . . . . . . . . . . 36
B.8. Since draft-shade-quic-http2-mapping-00 . . . . . . . . . 35 B.8. Since draft-ietf-quic-http-00 . . . . . . . . . . . . . . 37
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 35 B.9. Since draft-shade-quic-http2-mapping-00 . . . . . . . . . 37
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 37
1. Introduction 1. Introduction
The QUIC transport protocol has several features that are desirable The QUIC transport protocol has several features that are desirable
in a transport for HTTP, such as stream multiplexing, per-stream flow in a transport for HTTP, such as stream multiplexing, per-stream flow
control, and low-latency connection establishment. This document control, and low-latency connection establishment. This document
describes a mapping of HTTP semantics over QUIC, drawing heavily on describes a mapping of HTTP semantics over QUIC, drawing heavily on
the existing TCP mapping, HTTP/2. Specifically, this document the existing TCP mapping, HTTP/2. Specifically, this document
identifies HTTP/2 features that are subsumed by QUIC, and describes identifies HTTP/2 features that are subsumed by QUIC, and describes
how the other features can be implemented atop QUIC. how the other features can be implemented atop QUIC.
QUIC is described in [QUIC-TRANSPORT]. For a full description of QUIC is described in [QUIC-TRANSPORT]. For a full description of
HTTP/2, see [RFC7540]. HTTP/2, see [RFC7540].
1.1. Notational Conventions 1.1. Notational Conventions
The words "MUST", "MUST NOT", "SHOULD", and "MAY" are used in this The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
document. It's not shouting; when they are capitalized, they have "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
the special meaning defined in [RFC2119]. "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
Field definitions are given in Augmented Backus-Naur Form (ABNF), as Field definitions are given in Augmented Backus-Naur Form (ABNF), as
defined in [RFC5234]. defined in [RFC5234].
This document uses the variable-length integer encoding from
[QUIC-TRANSPORT].
Protocol elements called "frames" exist in both this document and
[QUIC-TRANSPORT]. Where frames from [QUIC-TRANSPORT] are referenced,
the frame name will be prefaced with "QUIC." For example, "QUIC
APPLICATION_CLOSE frames." References without this preface refer to
frames defined in Section 5.2.
2. QUIC Advertisement 2. QUIC Advertisement
An HTTP origin advertises the availability of an equivalent HTTP/QUIC An HTTP origin advertises the availability of an equivalent HTTP/QUIC
endpoint via the Alt-Svc HTTP response header or the HTTP/2 ALTSVC endpoint via the Alt-Svc HTTP response header or the HTTP/2 ALTSVC
frame ([RFC7838]), using the ALPN token defined in Section 3. frame ([RFC7838]), using the ALPN token defined in Section 3.
For example, an origin could indicate in an HTTP/1.1 or HTTP/2 For example, an origin could indicate in an HTTP/1.1 or HTTP/2
response that HTTP/QUIC was available on UDP port 50781 at the same response that HTTP/QUIC was available on UDP port 50781 at the same
hostname by including the following header in any response: hostname by including the following header in any response:
skipping to change at page 5, line 17 skipping to change at page 5, line 25
3. Connection Establishment 3. Connection Establishment
HTTP/QUIC connections are established as described in HTTP/QUIC connections are established as described in
[QUIC-TRANSPORT]. During connection establishment, HTTP/QUIC support [QUIC-TRANSPORT]. During connection establishment, HTTP/QUIC support
is indicated by selecting the ALPN token "hq" in the crypto is indicated by selecting the ALPN token "hq" in the crypto
handshake. handshake.
While connection-level options pertaining to the core QUIC protocol While connection-level options pertaining to the core QUIC protocol
are set in the initial crypto handshake, HTTP-specific settings are are set in the initial crypto handshake, HTTP-specific settings are
conveyed in the SETTINGS frame. After the QUIC connection is conveyed in the SETTINGS frame. After the QUIC connection is
established, a SETTINGS frame (Section 5.2.5) MUST be sent as the established, a SETTINGS frame (Section 5.2.5) MUST be sent by each
initial frame of the HTTP control stream (Stream ID 1, see endpoint as the initial frame of their respective HTTP control stream
Section 4). The server MUST NOT send data on any other stream until (Stream ID 2 or 3, see Section 4). The server MUST NOT send data on
the client's SETTINGS frame has been received. any other stream until the client's SETTINGS frame has been received.
3.1. Draft Version Identification 3.1. Draft Version Identification
*RFC Editor's Note:* Please remove this section prior to *RFC Editor's Note:* Please remove this section prior to
publication of a final version of this document. publication of a final version of this document.
Only implementations of the final, published RFC can identify Only implementations of the final, published RFC can identify
themselves as "hq". Until such an RFC exists, implementations MUST themselves as "hq". Until such an RFC exists, implementations MUST
NOT identify themselves using this string. NOT identify themselves using this string.
skipping to change at page 6, line 7 skipping to change at page 6, line 14
4. Stream Mapping and Usage 4. Stream Mapping and Usage
A QUIC stream provides reliable in-order delivery of bytes, but makes A QUIC stream provides reliable in-order delivery of bytes, but makes
no guarantees about order of delivery with regard to bytes on other no guarantees about order of delivery with regard to bytes on other
streams. On the wire, data is framed into QUIC STREAM frames, but streams. On the wire, data is framed into QUIC STREAM frames, but
this framing is invisible to the HTTP framing layer. A QUIC receiver this framing is invisible to the HTTP framing layer. A QUIC receiver
buffers and orders received STREAM frames, exposing the data buffers and orders received STREAM frames, exposing the data
contained within as a reliable byte stream to the application. contained within as a reliable byte stream to the application.
QUIC reserves Stream 0 for crypto operations (the handshake, crypto QUIC reserves the first client-initiated, bidirectional stream
config updates). Stream 1 is reserved for sending and receiving HTTP (Stream 0) for cryptographic operations. HTTP over QUIC reserves the
control frames, and is analogous to HTTP/2's Stream 0. This control first unidirectional stream sent by either peer (Streams 2 and 3) for
stream is considered critical to the HTTP connection. If the control sending and receiving HTTP control frames. This pair of
stream is closed for any reason, this MUST be treated as a connection unidirectional streams is analogous to HTTP/2's Stream 0. The data
error of type QUIC_CLOSED_CRITICAL_STREAM. sent on these streams is critical to the HTTP connection. If either
control stream is closed for any reason, this MUST be treated as a
connection error of type QUIC_CLOSED_CRITICAL_STREAM.
When HTTP headers and data are sent over QUIC, the QUIC layer handles When HTTP headers and data are sent over QUIC, the QUIC layer handles
most of the stream management. An HTTP request/response consumes a most of the stream management.
single stream: This means that the client's first request occurs on
QUIC stream 3, the second on stream 5, and so on. The server's first
push consumes stream 2.
This stream carries frames related to the request/response (see An HTTP request/response consumes a single client-initiated,
bidirectional stream. A bidirectional stream ensures that the
response can be readily correlated with the request. This means that
the client's first request occurs on QUIC stream 4, with subsequent
requests on stream 8, 12, and so on.
Server push uses server-initiated, unidirectional streams. Thus, the
server's first push consumes stream 7 and subsequent pushes use
stream 11, 15, and so on.
These streams carry frames related to the request/response (see
Section 5.2). When a stream terminates cleanly, if the last frame on Section 5.2). When a stream terminates cleanly, if the last frame on
the stream was truncated, this MUST be treated as a connection error the stream was truncated, this MUST be treated as a connection error
(see HTTP_MALFORMED_* in Section 7.1). Streams which terminate (see HTTP_MALFORMED_* in Section 7.1). Streams which terminate
abruptly may be reset at any point in the frame. abruptly may be reset at any point in the frame.
Streams SHOULD be used sequentially, with no gaps. Streams used for Streams SHOULD be used sequentially, with no gaps.
pushed resources MAY be initiated out-of-order, but stream IDs SHOULD
be allocated to promised resources sequentially.
HTTP does not need to do any separate multiplexing when using QUIC - HTTP does not need to do any separate multiplexing when using QUIC -
data sent over a QUIC stream always maps to a particular HTTP data sent over a QUIC stream always maps to a particular HTTP
transaction. Requests and responses are considered complete when the transaction. Requests and responses are considered complete when the
corresponding QUIC stream is closed in the appropriate direction. corresponding QUIC stream is closed in the appropriate direction.
4.1. Stream 1: Control Stream 4.1. Control Streams
Since most connection-level concerns will be managed by QUIC, the Since most connection-level concerns will be managed by QUIC, the
primary use of Stream 1 will be for the SETTINGS frame when the primary use of Streams 2 and 3 will be for the SETTINGS frame when
connection opens and for PRIORITY frames subsequently. the connection opens and for PRIORITY frames subsequently.
A pair of unidirectional streams is used rather than a single
bidirectional stream. This allows either peer to send data as soon
they are able. Depending on whether 0-RTT is enabled on the
connection, either client or server might be able to send stream data
first after the cryptographic handshake completes.
4.2. HTTP Message Exchanges 4.2. HTTP Message Exchanges
A client sends an HTTP request on a new QUIC stream. A server sends A client sends an HTTP request on a client-initiated, bidirectional
an HTTP response on the same stream as the request. QUIC stream. A server sends an HTTP response on the same stream as
the request.
An HTTP message (request or response) consists of: An HTTP message (request or response) consists of:
1. one header block (see Section 5.2.2) containing the message 1. one header block (see Section 5.2.2) containing the message
headers (see [RFC7230], Section 3.2), headers (see [RFC7230], Section 3.2),
2. the payload body (see [RFC7230], Section 3.3), sent as a series 2. the payload body (see [RFC7230], Section 3.3), sent as a series
of DATA frames (see Section 5.2.1), of DATA frames (see Section 5.2.1),
3. optionally, one header block containing the trailer-part, if 3. optionally, one header block containing the trailer-part, if
skipping to change at page 8, line 44 skipping to change at page 9, line 19
the client, as defined in [RFC7231], Section 4.3.6. the client, as defined in [RFC7231], Section 4.3.6.
All DATA frames on the request stream correspond to data sent on the All DATA frames on the request stream correspond to data sent on the
TCP connection. Any DATA frame sent by the client is transmitted by TCP connection. Any DATA frame sent by the client is transmitted by
the proxy to the TCP server; data received from the TCP server is the proxy to the TCP server; data received from the TCP server is
packaged into DATA frames by the proxy. Note that the size and packaged into DATA frames by the proxy. Note that the size and
number of TCP segments is not guaranteed to map predictably to the number of TCP segments is not guaranteed to map predictably to the
size and number of HTTP DATA or QUIC STREAM frames. size and number of HTTP DATA or QUIC STREAM frames.
The TCP connection can be closed by either peer. When the client The TCP connection can be closed by either peer. When the client
half-closes the request stream, the proxy will set the FIN bit on its ends the request stream (that is, the receive stream at the proxy
enters the "Data Recvd" state), the proxy will set the FIN bit on its
connection to the TCP server. When the proxy receives a packet with connection to the TCP server. When the proxy receives a packet with
the FIN bit set, it will half-close the corresponding stream. TCP the FIN bit set, it will terminate the send stream that it sends to
connections which remain half-closed in a single direction are not client. TCP connections which remain half-closed in a single
invalid, but are often handled poorly by servers, so clients SHOULD direction are not invalid, but are often handled poorly by servers,
NOT half-close connections on which they are still expecting data. so clients SHOULD NOT cause send a STREAM frame with a FIN bit for
connections on which they are still expecting data.
A TCP connection error is signaled with RST_STREAM. A proxy treats A TCP connection error is signaled with RST_STREAM. A proxy treats
any error in the TCP connection, which includes receiving a TCP any error in the TCP connection, which includes receiving a TCP
segment with the RST bit set, as a stream error of type segment with the RST bit set, as a stream error of type
HTTP_CONNECT_ERROR (Section 7.1). Correspondingly, a proxy MUST send HTTP_CONNECT_ERROR (Section 7.1). Correspondingly, a proxy MUST send
a TCP segment with the RST bit set if it detects an error with the a TCP segment with the RST bit set if it detects an error with the
stream or the QUIC connection. stream or the QUIC connection.
4.3. Request Prioritization 4.3. Request Prioritization
skipping to change at page 9, line 43 skipping to change at page 10, line 17
4.4. Server Push 4.4. Server Push
HTTP/QUIC supports server push as described in [RFC7540]. During HTTP/QUIC supports server push as described in [RFC7540]. During
connection establishment, the client enables server push by sending a connection establishment, the client enables server push by sending a
MAX_PUSH_ID frame (see Section 5.2.8). A server cannot use server MAX_PUSH_ID frame (see Section 5.2.8). A server cannot use server
push until it receives a MAX_PUSH_ID frame. push until it receives a MAX_PUSH_ID frame.
As with server push for HTTP/2, the server initiates a server push by As with server push for HTTP/2, the server initiates a server push by
sending a PUSH_PROMISE frame that includes request header fields sending a PUSH_PROMISE frame that includes request header fields
attributed to the request. The PUSH_PROMISE frame is sent on a attributed to the request. The PUSH_PROMISE frame is sent on the
response stream. Unlike HTTP/2, the PUSH_PROMISE does not reference client-initiated, bidirectional stream that carried the request that
a stream; when a server fulfills a promise, the stream that carries generated the push. This allows the server push to be associated
the stream headers references the PUSH_PROMISE. This allows a server with a request. Ordering of a PUSH_PROMISE in relation to certain
to fulfill promises in the order that best suits its needs. parts of the response is important (see Section 8.2.1 of [RFC7540]).
Unlike HTTP/2, the PUSH_PROMISE does not reference a stream; when a
server fulfills a promise, the stream that carries the stream headers
references a Push ID. This allows a server to fulfill promises in
the order that best suits its needs.
The server push response is conveyed on a push stream. A push stream The server push response is conveyed on a push stream. A push stream
is a server-initiated stream. A push stream includes a header (see is a server-initiated, unidirectional stream. A push stream includes
Figure 1) that identifies the PUSH_PROMISE that it fulfills. This a header (see Figure 1) that identifies the PUSH_PROMISE that it
header consists of a 32-bit Push ID, which identifies a server push fulfills. This header consists of a Push ID, encoded as a variable-
(see Section 5.2.6). length integer. The Push ID identifies a server push (see
Section 5.2.6).
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Push ID (32) | | Push ID (i) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: Push Stream Header Figure 1: Push Stream Header
A push stream always starts with a 32-bit Push ID. A client MUST A push stream always starts with a Push ID. A client MUST treat
treat receiving a push stream that contains fewer than 4 octets as a receiving a push stream that contains a truncated variable-length
connection error of type HTTP_MALFORMED_PUSH. integer as a connection error of type HTTP_MALFORMED_PUSH.
A server SHOULD use Push IDs sequentially, starting at 0. A client A server SHOULD use Push IDs sequentially, starting at 0. A client
uses the MAX_PUSH_ID frame (Section 5.2.8) to limit the number of uses the MAX_PUSH_ID frame (Section 5.2.8) to limit the number of
pushes that a server can promise. A client MUST treat receipt of a pushes that a server can promise. A client MUST treat receipt of a
push stream with a Push ID that is greater than the maximum Push ID push stream with a Push ID that is greater than the maximum Push ID
as a connection error of type HTTP_MALFORMED_PUSH. as a connection error of type HTTP_MALFORMED_PUSH.
Each Push ID MUST only be used once in a push stream header. If a Each Push ID MUST only be used once in a push stream header. If a
push stream header includes a Push ID that was used in another push push stream header includes a Push ID that was used in another push
stream header, the client MUST treat this as a connection error of stream header, the client MUST treat this as a connection error of
skipping to change at page 10, line 47 skipping to change at page 11, line 27
SHOULD send a CANCEL_PUSH frame; if the push stream is already open, SHOULD send a CANCEL_PUSH frame; if the push stream is already open,
a QUIC STOP_SENDING frame with an appropriate error code can be used a QUIC STOP_SENDING frame with an appropriate error code can be used
instead (e.g., HTTP_PUSH_REFUSED, HTTP_PUSH_ALREADY_IN_CACHE; see instead (e.g., HTTP_PUSH_REFUSED, HTTP_PUSH_ALREADY_IN_CACHE; see
Section 7). This asks the server not to transfer the data and Section 7). This asks the server not to transfer the data and
indicates that it will be discarded upon receipt. indicates that it will be discarded upon receipt.
5. HTTP Framing Layer 5. HTTP Framing Layer
Frames are used on each stream. This section describes HTTP framing Frames are used on each stream. This section describes HTTP framing
in QUIC and highlights some differences from HTTP/2 framing. For in QUIC and highlights some differences from HTTP/2 framing. For
more detail on differences from HTTP/2, see Section 8.1. more detail on differences from HTTP/2, see Section 8.2.
5.1. Frame Layout 5.1. Frame Layout
All frames have the following format: All frames have the following format:
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length (16) | Type (8) | Flags (8) | | Length (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Frame Payload (*) ... | Type (8) | Flags (8) | Frame Payload (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: HTTP/QUIC frame format Figure 2: HTTP/QUIC frame format
A frame includes the following fields:
Length: A variable-length integer that describes the length of the
Frame Payload. This length does not include the frame header.
Type: An 8-bit type for the frame.
Flags: An 8-bit field containing flags. The Type field determines
the semantics of flags.
Frame Payload: A payload, the semantics of which are determined by
the Type field.
5.2. Frame Definitions 5.2. Frame Definitions
5.2.1. DATA 5.2.1. DATA
DATA frames (type=0x0) convey arbitrary, variable-length sequences of DATA frames (type=0x0) convey arbitrary, variable-length sequences of
octets associated with an HTTP request or response payload. octets associated with an HTTP request or response payload.
The DATA frame defines no flags. The DATA frame defines no flags.
DATA frames MUST be associated with an HTTP request or response. If DATA frames MUST be associated with an HTTP request or response. If
a DATA frame is received on the control stream, the recipient MUST a DATA frame is received on either control stream, the recipient MUST
respond with a connection error (Section 7) of type respond with a connection error (Section 7) of type
HTTP_WRONG_STREAM. HTTP_WRONG_STREAM.
DATA frames MUST contain a non-zero-length payload. If a DATA frame DATA frames MUST contain a non-zero-length payload. If a DATA frame
is received with a payload length of zero, the recipient MUST respond is received with a payload length of zero, the recipient MUST respond
with a stream error (Section 7) of type HTTP_MALFORMED_DATA. with a stream error (Section 7) of type HTTP_MALFORMED_DATA.
5.2.2. HEADERS 5.2.2. HEADERS
The HEADERS frame (type=0x1) is used to carry part of a header set, The HEADERS frame (type=0x1) is used to carry a header block,
compressed using HPACK Section 4.2.1. compressed using HPACK Section 4.2.1.
One flag is defined: No flags are defined for the HEADERS frame.
End Header Block (0x4): This frame concludes a header block.
A HEADERS frame with any other flags set MUST be treated as a
connection error of type HTTP_MALFORMED_HEADERS.
The next frame on the same stream after a HEADERS frame without the
EHB flag set MUST be another HEADERS frame. A receiver MUST treat
the receipt of any other type of frame as a stream error of type
HTTP_INTERRUPTED_HEADERS. (Note that QUIC can intersperse data from
other streams between frames, or even during transmission of frames,
so multiplexing is not blocked by this requirement.)
A full header block is contained in a sequence of zero or more A HEADERS frame with any flags set MUST be treated as a connection
HEADERS frames without EHB set, followed by a HEADERS frame with EHB error of type HTTP_MALFORMED_HEADERS.
set.
5.2.3. PRIORITY 5.2.3. PRIORITY
The PRIORITY (type=0x02) frame specifies the sender-advised priority The PRIORITY (type=0x02) frame specifies the sender-advised priority
of a stream and is substantially different in format from [RFC7540]. of a stream and is substantially different in format from [RFC7540].
In order to ensure that prioritization is processed in a consistent In order to ensure that prioritization is processed in a consistent
order, PRIORITY frames MUST be sent on the control stream. A order, PRIORITY frames MUST be sent on the control stream. A
PRIORITY frame sent on any other stream MUST be treated as a PRIORITY frame sent on any other stream MUST be treated as a
HTTP_WRONG_STREAM error. HTTP_WRONG_STREAM error.
skipping to change at page 12, line 38 skipping to change at page 13, line 16
server push rather than a request. server push rather than a request.
PUSH_DEPENDENT (0x02): Indicates a dependency on a server push. PUSH_DEPENDENT (0x02): Indicates a dependency on a server push.
E (0x01): Indicates that the stream dependency is exclusive (see E (0x01): Indicates that the stream dependency is exclusive (see
[RFC7540], Section 5.3). [RFC7540], Section 5.3).
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Prioritized Request ID (32) | | Prioritized Request ID (i) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream Dependency ID (32) | | Stream Dependency ID (i) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Weight (8) | | Weight (8) |
+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
Figure 3: PRIORITY frame payload Figure 3: PRIORITY frame payload
The PRIORITY frame payload has the following fields: The PRIORITY frame payload has the following fields:
Prioritized Request ID: A 32-bit identifier for a request. This Prioritized Request ID: A variable-length integer that identifies a
contains the stream ID of a request stream when the request. This contains the Stream ID of a request stream when the
PUSH_PRIORITIZED flag is clear, or a Push ID when the PUSH_PRIORITIZED flag is clear, or a Push ID when the
PUSH_PRIORITIZED flag is set. PUSH_PRIORITIZED flag is set.
Stream Dependency ID: A 32-bit stream identifier for a dependent Stream Dependency ID: A variable-length integer that identifies a
request. This contains the stream ID of a request stream when the dependent request. This contains the Stream ID of a request
PUSH_DEPENDENT flag is clear, or a Push ID when the PUSH_DEPENDENT stream when the PUSH_DEPENDENT flag is clear, or a Push ID when
flag is set. A request stream ID of 0 indicates a dependency on the PUSH_DEPENDENT flag is set. A request Stream ID of 0
the root stream. For details of dependencies, see Section 4.3 and indicates a dependency on the root stream. For details of
[RFC7540], Section 5.3. dependencies, see Section 4.3 and [RFC7540], Section 5.3.
Weight: An unsigned 8-bit integer representing a priority weight for Weight: An unsigned 8-bit integer representing a priority weight for
the stream (see [RFC7540], Section 5.3). Add one to the value to the stream (see [RFC7540], Section 5.3). Add one to the value to
obtain a weight between 1 and 256. obtain a weight between 1 and 256.
A PRIORITY frame identifies a request to priotize, and a request upon A PRIORITY frame identifies a request to prioritize, and a request
which that request is dependent. A Prioritized Request ID or Stream upon which that request is dependent. A Prioritized Request ID or
Dependency ID identifies a client-initiated request using the Stream Dependency ID identifies a client-initiated request using the
corresponding stream ID when the corresponding PUSH_PRIORITIZED or corresponding stream ID when the corresponding PUSH_PRIORITIZED or
PUSH_DEPENDENT flag is not set. Setting the PUSH_PRIORITIZED or PUSH_DEPENDENT flag is not set. Setting the PUSH_PRIORITIZED or
PUSH_DEPENDENT flag causes the Prioritized Request ID or Stream PUSH_DEPENDENT flag causes the Prioritized Request ID or Stream
Dependency ID (respectively) to identify a server push using a Push Dependency ID (respectively) to identify a server push using a Push
ID (see Section 5.2.6 for details). ID (see Section 5.2.6 for details).
A PRIORITY frame MAY identify a Stream Dependency ID using a stream A PRIORITY frame MAY identify a Stream Dependency ID using a Stream
ID of 0; as in [RFC7540], this makes the request dependent on the ID of 0; as in [RFC7540], this makes the request dependent on the
root of the dependency tree. root of the dependency tree.
Stream ID 0 and stream ID 1 cannot be reprioritized. A Prioritized A PRIORITY frame MUST identify a client-initiated, bidirectional
Request ID that identifies Stream 0 or 1 MUST be treated as a stream. A server MUST treat receipt of PRIORITY frame with a Stream
connection error of type HTTP_MALFORMED_PRIORITY. ID of any other type as a connection error of type
HTTP_MALFORMED_PRIORITY.
Stream ID 0 cannot be reprioritized. A Prioritized Request ID that
identifies Stream 0 MUST be treated as a connection error of type
HTTP_MALFORMED_PRIORITY.
A PRIORITY frame that does not reference a request MUST be treated as A PRIORITY frame that does not reference a request MUST be treated as
a HTTP_MALFORMED_PRIORITY error, unless it references stream ID 0. A a HTTP_MALFORMED_PRIORITY error, unless it references Stream ID 0. A
PRIORITY that sets a PUSH_PRIORITIZED or PUSH_DEPENDENT flag, but PRIORITY that sets a PUSH_PRIORITIZED or PUSH_DEPENDENT flag, but
then references a non-existent Push ID MUST be treated as a then references a non-existent Push ID MUST be treated as a
HTTP_MALFORMED_PRIORITY error. HTTP_MALFORMED_PRIORITY error.
The length of a PRIORITY frame is 9 octets. A PRIORITY frame with A PRIORITY frame MUST contain only the identified fields. A PRIORITY
any other length MUST be treated as a connection error of type frame that contains more or fewer fields, or a PRIORITY frame that
HTTP_MALFORMED_PRIORITY. includes a truncated integer encoding MUST be treated as a connection
error of type HTTP_MALFORMED_PRIORITY.
5.2.4. CANCEL_PUSH 5.2.4. CANCEL_PUSH
The CANCEL_PUSH frame (type=0x3) is used to request cancellation of The CANCEL_PUSH frame (type=0x3) is used to request cancellation of
server push prior to the push stream being created. The CANCEL_PUSH server push prior to the push stream being created. The CANCEL_PUSH
frame identifies a server push request by Push ID (see frame identifies a server push request by Push ID (see Section 5.2.6)
Section 5.2.6). using a variable-length integer.
When a server receives this frame, it aborts sending the response for When a server receives this frame, it aborts sending the response for
the identified server push. If the server has not yet started to the identified server push. If the server has not yet started to
send the server push, it can use the receipt of a CANCEL_PUSH frame send the server push, it can use the receipt of a CANCEL_PUSH frame
to avoid opening a stream. If the push stream has been opened by the to avoid opening a stream. If the push stream has been opened by the
server, the server SHOULD sent a QUIC RST_STREAM frame on those server, the server SHOULD sent a QUIC RST_STREAM frame on those
streams and cease transmission of the response. streams and cease transmission of the response.
A server can send this frame to indicate that it won't be sending a A server can send this frame to indicate that it won't be sending a
response prior to creation of a push stream. Once the push stream response prior to creation of a push stream. Once the push stream
has been created, sending CANCEL_PUSH has no effect on the state of has been created, sending CANCEL_PUSH has no effect on the state of
the push stream. A QUIC RST_STREAM frame SHOULD be used instead to the push stream. A QUIC RST_STREAM frame SHOULD be used instead to
cancel transmission of the server push response. cancel transmission of the server push response.
A CANCEL_PUSH frame is sent on the control stream. Sending a A CANCEL_PUSH frame is sent on the control stream. Sending a
CANCEL_PUSH frame on a stream other than the control stream MUST be CANCEL_PUSH frame on a stream other than the control stream MUST be
treated as a stream error of type HTTP_WRONG_STREAM. treated as a stream error of type HTTP_WRONG_STREAM.
The CANCEL_PUSH frame has no defined flags. The CANCEL_PUSH frame has no defined flags.
The CANCEL_PUSH frame carries a 32-bit Push ID that identifies the The CANCEL_PUSH frame carries a Push ID encoded as a variable-length
server push that is being cancelled (see Section 5.2.6). integer. The Push ID identifies the server push that is being
cancelled (see Section 5.2.6).
If the client receives a CANCEL_PUSH frame, that frame might identify If the client receives a CANCEL_PUSH frame, that frame might identify
a Push ID that has not yet been mentioned by a PUSH_PROMISE frame. a Push ID that has not yet been mentioned by a PUSH_PROMISE frame.
A server MUST treat a CANCEL_PUSH frame payload that is other than 4 A server MUST treat a CANCEL_PUSH frame payload does not contain
octets in length as a connection error of type exactly one variable-length integer as a connection error of type
HTTP_MALFORMED_CANCEL_PUSH. HTTP_MALFORMED_CANCEL_PUSH.
5.2.5. SETTINGS 5.2.5. SETTINGS
The SETTINGS frame (type=0x4) conveys configuration parameters that The SETTINGS frame (type=0x4) conveys configuration parameters that
affect how endpoints communicate, such as preferences and constraints affect how endpoints communicate, such as preferences and constraints
on peer behavior, and is different from [RFC7540]. Individually, a on peer behavior, and is different from [RFC7540]. Individually, a
SETTINGS parameter can also be referred to as a "setting". SETTINGS parameter can also be referred to as a "setting".
SETTINGS parameters are not negotiated; they describe characteristics SETTINGS parameters are not negotiated; they describe characteristics
skipping to change at page 15, line 18 skipping to change at page 16, line 8
The SETTINGS frame defines no flags. The SETTINGS frame defines no flags.
The payload of a SETTINGS frame consists of zero or more parameters, The payload of a SETTINGS frame consists of zero or more parameters,
each consisting of an unsigned 16-bit setting identifier and a each consisting of an unsigned 16-bit setting identifier and a
length-prefixed binary value. length-prefixed binary value.
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identifier (16) | Length (16) | | Identifier (16) | Length (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Contents (?) ... | Contents (?) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: SETTINGS value format Figure 4: SETTINGS value format
A zero-length content indicates that the setting value is a Boolean A zero-length content indicates that the setting value is a Boolean
and true. False is indicated by the absence of the setting. and true. False is indicated by the absence of the setting.
Non-zero-length values MUST be compared against the remaining length Non-zero-length values MUST be compared against the remaining length
of the SETTINGS frame. Any value which purports to cross the end of of the SETTINGS frame. Any value which purports to cross the end of
the frame MUST cause the SETTINGS frame to be considered malformed the frame MUST cause the SETTINGS frame to be considered malformed
and trigger a connection error of type HTTP_MALFORMED_SETTINGS. and trigger a connection error of type HTTP_MALFORMED_SETTINGS.
An implementation MUST ignore the contents for any SETTINGS An implementation MUST ignore the contents for any SETTINGS
identifier it does not understand. identifier it does not understand.
SETTINGS frames always apply to a connection, never a single stream. SETTINGS frames always apply to a connection, never a single stream.
A SETTINGS frame MUST be sent as the first frame of the control A SETTINGS frame MUST be sent as the first frame of either control
stream (see Section 4) by each peer, and MUST NOT be sent stream (see Section 4) by each peer, and MUST NOT be sent
subsequently or on any other stream. If an endpoint receives an subsequently or on any other stream. If an endpoint receives an
SETTINGS frame on a different stream, the endpoint MUST respond with SETTINGS frame on a different stream, the endpoint MUST respond with
a connection error of type HTTP_WRONG_STREAM. If an endpoint a connection error of type HTTP_WRONG_STREAM. If an endpoint
receives a second SETTINGS frame, the endpoint MUST respond with a receives a second SETTINGS frame, the endpoint MUST respond with a
connection error of type HTTP_MULTIPLE_SETTINGS. connection error of type HTTP_MULTIPLE_SETTINGS.
The SETTINGS frame affects connection state. A badly formed or The SETTINGS frame affects connection state. A badly formed or
incomplete SETTINGS frame MUST be treated as a connection error incomplete SETTINGS frame MUST be treated as a connection error
(Section 7) of type HTTP_MALFORMED_SETTINGS. (Section 7) of type HTTP_MALFORMED_SETTINGS.
5.2.5.1. Integer encoding 5.2.5.1. Integer encoding
Settings which are integers are transmitted in network byte order. Settings which are integers use the QUIC variable-length integer
Leading zero octets are permitted, but implementations SHOULD use encoding.
only as many bytes as are needed to represent the value. An integer
MUST NOT be represented in more bytes than would be used to transfer
the maximum permitted value.
5.2.5.2. Defined SETTINGS Parameters 5.2.5.2. Defined SETTINGS Parameters
The following settings are defined in HTTP/QUIC: The following settings are defined in HTTP/QUIC:
SETTINGS_HEADER_TABLE_SIZE (0x1): An integer with a maximum value of SETTINGS_HEADER_TABLE_SIZE (0x1): An integer with a maximum value of
2^32 - 1. This value MUST be zero. 2^30 - 1. This value MUST be zero.
SETTINGS_MAX_HEADER_LIST_SIZE (0x6): An integer with a maximum value SETTINGS_MAX_HEADER_LIST_SIZE (0x6): An integer with a maximum value
of 2^32 - 1 of 2^30 - 1
5.2.5.3. Usage in 0-RTT 5.2.5.3. Usage in 0-RTT
When a 0-RTT QUIC connection is being used, the client's initial When a 0-RTT QUIC connection is being used, the client's initial
requests will be sent before the arrival of the server's SETTINGS requests will be sent before the arrival of the server's SETTINGS
frame. Clients SHOULD cache at least the following settings about frame. Clients SHOULD cache at least the following settings about
servers: servers:
o SETTINGS_HEADER_TABLE_SIZE o SETTINGS_HEADER_TABLE_SIZE
skipping to change at page 17, line 16 skipping to change at page 17, line 47
5.2.6. PUSH_PROMISE 5.2.6. PUSH_PROMISE
The PUSH_PROMISE frame (type=0x05) is used to carry a request header The PUSH_PROMISE frame (type=0x05) is used to carry a request header
set from server to client, as in HTTP/2. The PUSH_PROMISE frame set from server to client, as in HTTP/2. The PUSH_PROMISE frame
defines no flags. defines no flags.
0 1 2 3 0 1 2 3
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 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Push ID (32) | | Push ID (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Header Block (*) ... | Header Block (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 5: PUSH_PROMISE frame payload Figure 5: PUSH_PROMISE frame payload
The payload consists of: The payload consists of:
Push ID: A 32-bit identifier for the server push request. A push ID Push ID: A variable-length integer that identifies the server push
is used in push stream header (Section 4.4), CANCEL_PUSH frames request. A push ID is used in push stream header (Section 4.4),
(Section 5.2.4), and PRIORITY frames (Section 5.2.3). CANCEL_PUSH frames (Section 5.2.4), and PRIORITY frames
(Section 5.2.3).
Header Block: HPACK-compressed request headers for the promised Header Block: HPACK-compressed request headers for the promised
response. response.
A server MUST NOT use a Push ID that is larger than the client has A server MUST NOT use a Push ID that is larger than the client has
provided in a MAX_PUSH_ID frame (Section 5.2.8). A client MUST treat provided in a MAX_PUSH_ID frame (Section 5.2.8). A client MUST treat
receipt of a PUSH_PROMISE that contains a larger Push ID than the receipt of a PUSH_PROMISE that contains a larger Push ID than the
client has advertised as a connection error of type client has advertised as a connection error of type
HTTP_MALFORMED_PUSH_PROMISE. HTTP_MALFORMED_PUSH_PROMISE.
skipping to change at page 18, line 19 skipping to change at page 18, line 49
time. Clients that see a PUSH_PROMISE that uses a Push ID that they time. Clients that see a PUSH_PROMISE that uses a Push ID that they
have since consumed and discarded are forced to ignore the have since consumed and discarded are forced to ignore the
PUSH_PROMISE. PUSH_PROMISE.
5.2.7. GOAWAY 5.2.7. GOAWAY
The GOAWAY frame (type=0x7) is used to initiate graceful shutdown of The GOAWAY frame (type=0x7) is used to initiate graceful shutdown of
a connection by a server. GOAWAY allows a server to stop accepting a connection by a server. GOAWAY allows a server to stop accepting
new requests while still finishing processing of previously received new requests while still finishing processing of previously received
requests. This enables administrative actions, like server requests. This enables administrative actions, like server
maintenance. GOAWAY by itself does not close a connection. (Note maintenance. GOAWAY by itself does not close a connection.
that clients do not need to send GOAWAY to gracefully close a
connection; they simply stop making new requests.)
The GOAWAY frame does not define any flags, and the payload is a QUIC The GOAWAY frame does not define any flags, and the payload is a QUIC
stream identifier. The GOAWAY frame applies to the connection, not a Stream ID for a client-initiated, bidirectional stream encoded as a
specific stream. An endpoint MUST treat a GOAWAY frame on a stream variable-length integer.
other than the control stream as a connection error (Section 7) of
type HTTP_WRONG_STREAM. Clients do not need to send GOAWAY to initiate a graceful shutdown;
they simply stop making new requests. A server MUST treat receipt of
a GOAWAY frame as a connection error (Section 7) of type
HTTP_UNEXPECTED_GOAWAY.
A client MUST treat receipt of a GOAWAY frame containing a Stream ID
of any other type as a connection error of type
HTTP_MALFORMED_GOAWAY.
The GOAWAY frame applies to the connection, not a specific stream.
An endpoint MUST treat a GOAWAY frame on a stream other than the
control stream as a connection error (Section 7) of type
HTTP_WRONG_STREAM.
New client requests might already have been sent before the client New client requests might already have been sent before the client
receives the server's GOAWAY frame. The GOAWAY frame contains the receives the server's GOAWAY frame. The GOAWAY frame contains the
stream identifier of the last client-initiated request that was or Stream ID of the last client-initiated request that was or might be
might be processed in this connection, which enables client and processed in this connection, which enables client and server to
server to agree on which requests were accepted prior to the agree on which requests were accepted prior to the connection
connection shutdown. This identifier MAY be lower than the stream shutdown. This identifier MAY be lower than the stream limit
limit identified by a QUIC MAX_STREAM_ID frame, and MAY be zero if no identified by a QUIC MAX_STREAM_ID frame, and MAY be zero if no
requests were processed. Servers SHOULD NOT increase the requests were processed. Servers SHOULD NOT increase the
MAX_STREAM_ID limit after sending a GOAWAY frame. MAX_STREAM_ID limit after sending a GOAWAY frame.
Note: In this context, "processed" means that some data from the Note: In this context, "processed" means that some data from the
stream was passed to some higher layer of software that might have stream was passed to some higher layer of software that might have
taken some action as a result. taken some action as a result.
Once sent, the server will refuse requests sent on streams with an Once sent, the server will refuse requests sent on streams with an
identifier higher than the included last stream identifier. Clients identifier higher than the included last Stream ID. Clients MUST NOT
MUST NOT send new requests on the connection after receiving GOAWAY, send new requests on the connection after receiving GOAWAY, although
although requests might already be in transit. A new connection can requests might already be in transit. A new connection can be
be established for new requests. established for new requests.
If the client has sent requests on streams with a higher stream If the client has sent requests on streams with a higher Stream ID
identifier than indicated in the GOAWAY frame, those requests were than indicated in the GOAWAY frame, those requests were not and will
not and will not be processed. Endpoints SHOULD reset any streams not be processed. Endpoints SHOULD reset any streams above this ID
above this ID with the error code HTTP_REQUEST_CANCELLED. Servers with the error code HTTP_REQUEST_CANCELLED. Servers MAY also reset
MAY also reset streams below the indicated ID with streams below the indicated ID with HTTP_REQUEST_CANCELLED if the
HTTP_REQUEST_CANCELLED if the associated requests were not processed. associated requests were not processed. Servers MUST NOT use the
Servers MUST NOT use the HTTP_REQUEST_CANCELLED status for requests HTTP_REQUEST_CANCELLED status for requests which were partially or
which were partially or fully processed. fully processed.
The client can treat requests cancelled by the server as though they The client can treat requests cancelled by the server as though they
had never been sent at all, thereby allowing them to be retried later had never been sent at all, thereby allowing them to be retried later
on a new connection. If a stream is cancelled after receiving a on a new connection. If a stream is cancelled after receiving a
complete response, the client MAY ignore the cancellation and use the complete response, the client MAY ignore the cancellation and use the
response. However, if a stream is cancelled after receiving a response. However, if a stream is cancelled after receiving a
partial response, the response SHOULD NOT be used. Automatically partial response, the response SHOULD NOT be used. Automatically
retrying such requests is not possible, unless this is otherwise retrying such requests is not possible, unless this is otherwise
permitted (e.g. idempotent actions like GET, PUT, or DELETE). permitted (e.g., idempotent actions like GET, PUT, or DELETE).
Requests on stream IDs less than or equal to the stream ID in the Requests on Stream IDs less than or equal to the Stream ID in the
GOAWAY frame might have been processed; their status cannot be known GOAWAY frame might have been processed; their status cannot be known
until they are completed successfully, reset individually, or the until they are completed successfully, reset individually, or the
connection terminates. connection terminates.
Servers SHOULD send a GOAWAY frame when the closing of a connection Servers SHOULD send a GOAWAY frame when the closing of a connection
is known in advance, even if the advance notice is small, so that the is known in advance, even if the advance notice is small, so that the
remote peer can know whether a stream has been partially processed or remote peer can know whether a stream has been partially processed or
not. For example, if an HTTP client sends a POST at the same time not. For example, if an HTTP client sends a POST at the same time
that a server closes a QUIC connection, the client cannot know if the that a server closes a QUIC connection, the client cannot know if the
server started to process that POST request if the server does not server started to process that POST request if the server does not
send a GOAWAY frame to indicate what streams it might have acted on. send a GOAWAY frame to indicate what streams it might have acted on.
For unexpected closures caused by error conditions, a QUIC For unexpected closures caused by error conditions, a QUIC
CONNECTION_CLOSE frame MUST be used. However, a GOAWAY MAY be sent CONNECTION_CLOSE or APPLICATION_CLOSE frame MUST be used. However, a
first to provide additional detail to clients. If a connection GOAWAY MAY be sent first to provide additional detail to clients and
terminates without a GOAWAY frame, the last stream identifier is to allow the client to retry requests. Including the GOAWAY frame in
effectively the highest possible stream identifier (as determined by the same packet as the QUIC CONNECTION_CLOSE or APPLICATION_CLOSE
frame improves the chances of the frame being received by clients.
If a connection terminates without a GOAWAY frame, the last Stream ID
is effectively the highest possible Stream ID (as determined by
QUIC's MAX_STREAM_ID). QUIC's MAX_STREAM_ID).
An endpoint MAY send multiple GOAWAY frames if circumstances change. An endpoint MAY send multiple GOAWAY frames if circumstances change.
For instance, an endpoint that sends GOAWAY without an error code For instance, an endpoint that sends GOAWAY without an error code
during graceful shutdown could subsequently encounter an error during graceful shutdown could subsequently encounter an error
condition. The last stream identifier from the last GOAWAY frame condition. The last stream identifier from the last GOAWAY frame
received indicates which streams could have been acted upon. received indicates which streams could have been acted upon. A
Endpoints MUST NOT increase the value they send in the last stream server MUST NOT increase the value they send in the last Stream ID,
identifier, since the peers might already have retried unprocessed since clients might already have retried unprocessed requests on
requests on another connection. another connection.
A client that is unable to retry requests loses all requests that are A client that is unable to retry requests loses all requests that are
in flight when the server closes the connection. A server that is in flight when the server closes the connection. A server that is
attempting to gracefully shut down a connection SHOULD send an attempting to gracefully shut down a connection SHOULD send an
initial GOAWAY frame with the last stream identifier set to the initial GOAWAY frame with the last Stream ID set to the current value
current value of QUIC's MAX_STREAM_ID and SHOULD NOT increase the of QUIC's MAX_STREAM_ID and SHOULD NOT increase the MAX_STREAM_ID
MAX_STREAM_ID thereafter. This signals to the client that a shutdown thereafter. This signals to the client that a shutdown is imminent
is imminent and that initiating further requests is prohibited. and that initiating further requests is prohibited. After allowing
After allowing time for any in-flight requests (at least one round- time for any in-flight requests (at least one round-trip time), the
trip time), the server MAY send another GOAWAY frame with an updated server MAY send another GOAWAY frame with an updated last Stream ID.
last stream identifier. This ensures that a connection can be This ensures that a connection can be cleanly shut down without
cleanly shut down without losing requests. losing requests.
Once all requests on streams at or below the identified stream number
have been completed or cancelled, and all promised server push
responses associated with those requests have been completed or
cancelled, the connection can be closed using an Immediate Close (see
[QUIC-TRANSPORT]). An endpoint that completes a graceful shutdown
SHOULD use the QUIC APPLICATION_CLOSE frame with the HTTP_NO_ERROR
code.
5.2.8. MAX_PUSH_ID 5.2.8. MAX_PUSH_ID
The MAX_PUSH_ID frame (type=0xD) is used by clients to control the The MAX_PUSH_ID frame (type=0xD) is used by clients to control the
number of server pushes that the server can initiate. This sets the number of server pushes that the server can initiate. This sets the
maximum value for a Push ID that the server can use in a PUSH_PROMISE maximum value for a Push ID that the server can use in a PUSH_PROMISE
frame. Consequently, this also limits the number of push streams frame. Consequently, this also limits the number of push streams
that the server can initiate in addition to the limit set by the QUIC that the server can initiate in addition to the limit set by the QUIC
MAX_STREAM_ID frame. MAX_STREAM_ID frame.
The MAX_PUSH_ID frame is always sent on the control stream. Receipt The MAX_PUSH_ID frame is always sent on a control stream. Receipt of
of a MAX_PUSH_ID frame on any other stream MUST be treated as a a MAX_PUSH_ID frame on any other stream MUST be treated as a
connection error of type HTTP_WRONG_STREAM. connection error of type HTTP_WRONG_STREAM.
A server MUST NOT send a MAX_PUSH_ID frame. A client MUST treat the A server MUST NOT send a MAX_PUSH_ID frame. A client MUST treat the
receipt of a MAX_PUSH_ID frame as a connection error of type receipt of a MAX_PUSH_ID frame as a connection error of type
HTTP_MALFORMED_MAX_PUSH_ID. HTTP_MALFORMED_MAX_PUSH_ID.
The maximum Push ID is unset when a connection is created, meaning The maximum Push ID is unset when a connection is created, meaning
that a server cannot push until it receives a MAX_PUSH_ID frame. A that a server cannot push until it receives a MAX_PUSH_ID frame. A
client that wishes to manage the number of promised server pushes can client that wishes to manage the number of promised server pushes can
increase the maximum Push ID by sending a MAX_PUSH_ID frame as the increase the maximum Push ID by sending a MAX_PUSH_ID frame as the
server fulfills or cancels server pushes. server fulfills or cancels server pushes.
The MAX_PUSH_ID frame has no defined flags. The MAX_PUSH_ID frame has no defined flags.
The MAX_PUSH_ID frame carries a 32-bit Push ID that identifies the The MAX_PUSH_ID frame carries a single variable-length integer that
maximum value for a Push ID that the server can use (see identifies the maximum value for a Push ID that the server can use
Section 5.2.6). A MAX_PUSH_ID frame cannot reduce the maximum Push (see Section 5.2.6). A MAX_PUSH_ID frame cannot reduce the maximum
ID; receipt of a MAX_PUSH_ID that contains a smaller value than Push ID; receipt of a MAX_PUSH_ID that contains a smaller value than
previously received MUST be treated as a connection error of type previously received MUST be treated as a connection error of type
HTTP_MALFORMED_MAX_PUSH_ID. HTTP_MALFORMED_MAX_PUSH_ID.
A server MUST treat a MAX_PUSH_ID frame payload that is other than 4 A server MUST treat a MAX_PUSH_ID frame payload that does not contain
octets in length as a connection error of type a single variable-length integer as a connection error of type
HTTP_MALFORMED_MAX_PUSH_ID. HTTP_MALFORMED_MAX_PUSH_ID.
6. Connection Management 6. Connection Management
QUIC connections are persistent. All of the considerations in QUIC connections are persistent. All of the considerations in
Section 9.1 of [RFC7540] apply to the management of QUIC connections. Section 9.1 of [RFC7540] apply to the management of QUIC connections.
HTTP clients are expected to use QUIC PING frames to keep connections HTTP clients are expected to use QUIC PING frames to keep connections
open. Servers SHOULD NOT use PING frames to keep a connection open. open. Servers SHOULD NOT use PING frames to keep a connection open.
A client SHOULD NOT use PING frames for this purpose unless there are A client SHOULD NOT use PING frames for this purpose unless there are
skipping to change at page 22, line 44 skipping to change at page 23, line 47
HTTP_MULTIPLE_SETTINGS (0x11): More than one SETTINGS frame was HTTP_MULTIPLE_SETTINGS (0x11): More than one SETTINGS frame was
received. received.
HTTP_MALFORMED_PUSH (0x12): A push stream header was malformed or HTTP_MALFORMED_PUSH (0x12): A push stream header was malformed or
included an invalid Push ID. included an invalid Push ID.
HTTP_MALFORMED_MAX_PUSH_ID (0x13): A MAX_PUSH_ID frame has been HTTP_MALFORMED_MAX_PUSH_ID (0x13): A MAX_PUSH_ID frame has been
received with an invalid format. received with an invalid format.
HTTP_UNEXPECTED_GOAWAY (0x14): A GOAWAY frame has been received by a
server.
HTTP_MALFORMED_GOAWAY (0x15): A GOAWAY frame was malformed or
contained an invalid Stream ID.
8. Considerations for Transitioning from HTTP/2 8. Considerations for Transitioning from HTTP/2
HTTP/QUIC is strongly informed by HTTP/2, and bears many HTTP/QUIC is strongly informed by HTTP/2, and bears many
similarities. This section describes the approach taken to design similarities. This section describes the approach taken to design
HTTP/QUIC, points out important differences from HTTP/2, and HTTP/QUIC, points out important differences from HTTP/2, and
describes how to map HTTP/2 extensions into HTTP/QUIC. describes how to map HTTP/2 extensions into HTTP/QUIC.
HTTP/QUIC begins from the premise that HTTP/2 code reuse is a useful HTTP/QUIC begins from the premise that HTTP/2 code reuse is a useful
feature, but not a hard requirement. HTTP/QUIC departs from HTTP/2 feature, but not a hard requirement. HTTP/QUIC departs from HTTP/2
primarily where necessary to accommodate the differences in behavior primarily where necessary to accommodate the differences in behavior
between QUIC and TCP (lack of ordering, support for streams). We between QUIC and TCP (lack of ordering, support for streams). We
intend to avoid gratuitous changes which make it difficult or intend to avoid gratuitous changes which make it difficult or
impossible to build extensions with the same semantics applicable to impossible to build extensions with the same semantics applicable to
both protocols at once. both protocols at once.
These departures are noted in this section. These departures are noted in this section.
8.1. HTTP Frame Types 8.1. Streams
HTTP/QUIC permits use of a larger number of streams (2^62-1) then
HTTP/2. The considerations about exhaustion of stream identifier
space apply, though the space is significantly larger such that it is
likely that other limits in QUIC are reached first, such as the limit
on the connection flow control window.
8.2. HTTP Frame Types
Many framing concepts from HTTP/2 can be elided away on QUIC, because Many framing concepts from HTTP/2 can be elided away on QUIC, because
the transport deals with them. Because frames are already on a the transport deals with them. Because frames are already on a
stream, they can omit the stream number. Because frames do not block stream, they can omit the stream number. Because frames do not block
multiplexing (QUIC's multiplexing occurs below this layer), the multiplexing (QUIC's multiplexing occurs below this layer), the
support for variable-maximum-length packets can be removed. Because support for variable-maximum-length packets can be removed. Because
stream termination is handled by QUIC, an END_STREAM flag is not stream termination is handled by QUIC, an END_STREAM flag is not
required. required.
Frame payloads are largely drawn from [RFC7540]. However, QUIC Frame payloads are largely drawn from [RFC7540]. However, QUIC
skipping to change at page 23, line 48 skipping to change at page 25, line 18
notion of in-order delivery of priority changes (i.e., dependency notion of in-order delivery of priority changes (i.e., dependency
tree mutations): since operations on the dependency tree such as tree mutations): since operations on the dependency tree such as
reparenting a subtree are not commutative, both sender and receiver reparenting a subtree are not commutative, both sender and receiver
must apply them in the same order to ensure that both sides have a must apply them in the same order to ensure that both sides have a
consistent view of the stream dependency tree. HTTP/2 specifies consistent view of the stream dependency tree. HTTP/2 specifies
priority assignments in PRIORITY frames and (optionally) in HEADERS priority assignments in PRIORITY frames and (optionally) in HEADERS
frames. To achieve in-order delivery of priority changes in HTTP/ frames. To achieve in-order delivery of priority changes in HTTP/
QUIC, PRIORITY frames are sent on the control stream and the PRIORITY QUIC, PRIORITY frames are sent on the control stream and the PRIORITY
section is removed from the HEADERS frame. section is removed from the HEADERS frame.
Frame type definitions in HTTP/QUIC often use the QUIC variable-
length integer encoding. In particular, Stream IDs use this
encoding, which allow for a larger range of possible values than the
encoding used in HTTP/2. Redefinition of the encoding of extension
frame types might be necessary if the encoding includes a Stream ID.
Other than this issue, frame type HTTP/2 extensions are typically Other than this issue, frame type HTTP/2 extensions are typically
portable to QUIC simply by replacing Stream 0 in HTTP/2 with Stream 1 portable to QUIC simply by replacing Stream 0 in HTTP/2 with Stream 2
in HTTP/QUIC. HTTP/QUIC extensions will not assume ordering, but or 3 in HTTP/QUIC. HTTP/QUIC extensions will not assume ordering,
would not be harmed by ordering, and would be portable to HTTP/2 in but would not be harmed by ordering, and would be portable to HTTP/2
the same manner. in the same manner.
Below is a listing of how each HTTP/2 frame type is mapped: Below is a listing of how each HTTP/2 frame type is mapped:
DATA (0x0): Padding is not defined in HTTP/QUIC frames. See DATA (0x0): Padding is not defined in HTTP/QUIC frames. See
Section 5.2.1. Section 5.2.1.
HEADERS (0x1): As described above, the PRIORITY region of HEADERS is HEADERS (0x1): As described above, the PRIORITY region of HEADERS is
not supported. A separate PRIORITY frame MUST be used. Padding not supported. A separate PRIORITY frame MUST be used. Padding
is not defined in HTTP/QUIC frames. See Section 5.2.2. is not defined in HTTP/QUIC frames. See Section 5.2.2.
PRIORITY (0x2): As described above, the PRIORITY frame is sent on PRIORITY (0x2): As described above, the PRIORITY frame is sent on
the control stream. See Section 5.2.3. the control stream. See Section 5.2.3.
RST_STREAM (0x3): RST_STREAM frames do not exist, since QUIC RST_STREAM (0x3): RST_STREAM frames do not exist, since QUIC
provides stream lifecycle management. The same code point is used provides stream lifecycle management. The same code point is used
for the CANCEL_PUSH frame (Section 5.2.4). for the CANCEL_PUSH frame (Section 5.2.4).
SETTINGS (0x4): SETTINGS frames are sent only at the beginning of SETTINGS (0x4): SETTINGS frames are sent only at the beginning of
the connection. See Section 5.2.5 and Section 8.2. the connection. See Section 5.2.5 and Section 8.3.
PUSH_PROMISE (0x5): The PUSH_PROMISE does not reference a stream; PUSH_PROMISE (0x5): The PUSH_PROMISE does not reference a stream;
instead the push stream references the PUSH_PROMISE frame using a instead the push stream references the PUSH_PROMISE frame using a
Push ID. See Section 5.2.6. Push ID. See Section 5.2.6.
PING (0x6): PING frames do not exist, since QUIC provides equivalent PING (0x6): PING frames do not exist, since QUIC provides equivalent
functionality. functionality.
GOAWAY (0x7): GOAWAY is sent only from server to client and does not GOAWAY (0x7): GOAWAY is sent only from server to client and does not
contain an error code. See Section 5.2.7. contain an error code. See Section 5.2.7.
skipping to change at page 25, line 5 skipping to change at page 26, line 23
CONTINUATION (0x9): CONTINUATION frames do not exist; instead, CONTINUATION (0x9): CONTINUATION frames do not exist; instead,
larger HEADERS/PUSH_PROMISE frames than HTTP/2 are permitted, and larger HEADERS/PUSH_PROMISE frames than HTTP/2 are permitted, and
HEADERS frames can be used in series. HEADERS frames can be used in series.
Frame types defined by extensions to HTTP/2 need to be separately Frame types defined by extensions to HTTP/2 need to be separately
registered for HTTP/QUIC if still applicable. The IDs of frames registered for HTTP/QUIC if still applicable. The IDs of frames
defined in [RFC7540] have been reserved for simplicity. See defined in [RFC7540] have been reserved for simplicity. See
Section 10.3. Section 10.3.
8.2. HTTP/2 SETTINGS Parameters 8.3. HTTP/2 SETTINGS Parameters
An important difference from HTTP/2 is that settings are sent once, An important difference from HTTP/2 is that settings are sent once,
at the beginning of the connection, and thereafter cannot change. at the beginning of the connection, and thereafter cannot change.
This eliminates many corner cases around synchronization of changes. This eliminates many corner cases around synchronization of changes.
Some transport-level options that HTTP/2 specifies via the SETTINGS Some transport-level options that HTTP/2 specifies via the SETTINGS
frame are superseded by QUIC transport parameters in HTTP/QUIC. The frame are superseded by QUIC transport parameters in HTTP/QUIC. The
HTTP-level options that are retained in HTTP/QUIC have the same value HTTP-level options that are retained in HTTP/QUIC have the same value
as in HTTP/2. as in HTTP/2.
Below is a listing of how each HTTP/2 SETTINGS parameter is mapped: Below is a listing of how each HTTP/2 SETTINGS parameter is mapped:
SETTINGS_HEADER_TABLE_SIZE: See Section 5.2.5.2. SETTINGS_HEADER_TABLE_SIZE: See Section 5.2.5.2.
SETTINGS_ENABLE_PUSH: This is removed in favor of the MAX_PUSH_ID SETTINGS_ENABLE_PUSH: This is removed in favor of the MAX_PUSH_ID
which provides a more granular control over server push. which provides a more granular control over server push.
SETTINGS_MAX_CONCURRENT_STREAMS: QUIC controls the largest open SETTINGS_MAX_CONCURRENT_STREAMS: QUIC controls the largest open
stream ID as part of its flow control logic. Specifying Stream ID as part of its flow control logic. Specifying
SETTINGS_MAX_CONCURRENT_STREAMS in the SETTINGS frame is an error. SETTINGS_MAX_CONCURRENT_STREAMS in the SETTINGS frame is an error.
SETTINGS_INITIAL_WINDOW_SIZE: QUIC requires both stream and SETTINGS_INITIAL_WINDOW_SIZE: QUIC requires both stream and
connection flow control window sizes to be specified in the connection flow control window sizes to be specified in the
initial transport handshake. Specifying initial transport handshake. Specifying
SETTINGS_INITIAL_WINDOW_SIZE in the SETTINGS frame is an error. SETTINGS_INITIAL_WINDOW_SIZE in the SETTINGS frame is an error.
SETTINGS_MAX_FRAME_SIZE: This setting has no equivalent in HTTP/ SETTINGS_MAX_FRAME_SIZE: This setting has no equivalent in HTTP/
QUIC. Specifying it in the SETTINGS frame is an error. QUIC. Specifying it in the SETTINGS frame is an error.
SETTINGS_MAX_HEADER_LIST_SIZE: See Section 5.2.5.2. SETTINGS_MAX_HEADER_LIST_SIZE: See Section 5.2.5.2.
Settings need to be defined separately for HTTP/2 and HTTP/QUIC. The Settings need to be defined separately for HTTP/2 and HTTP/QUIC. The
IDs of settings defined in [RFC7540] have been reserved for IDs of settings defined in [RFC7540] have been reserved for
simplicity. See Section 10.4. simplicity. See Section 10.4.
8.3. HTTP/2 Error Codes 8.4. HTTP/2 Error Codes
QUIC has the same concepts of "stream" and "connection" errors that QUIC has the same concepts of "stream" and "connection" errors that
HTTP/2 provides. However, because the error code space is shared HTTP/2 provides. However, because the error code space is shared
between multiple components, there is no direct portability of HTTP/2 between multiple components, there is no direct portability of HTTP/2
error codes. error codes.
The HTTP/2 error codes defined in Section 7 of [RFC7540] map to the The HTTP/2 error codes defined in Section 7 of [RFC7540] map to the
HTTP over QUIC error codes as follows: HTTP over QUIC error codes as follows:
NO_ERROR (0x0): HTTP_NO_ERROR in Section 7.1. NO_ERROR (0x0): HTTP_NO_ERROR in Section 7.1.
skipping to change at page 31, line 49 skipping to change at page 33, line 39
| | 1 | SETTINGS | | | | 1 | SETTINGS | |
| | | frames | | | | | frames | |
| | | | | | | | | |
| HTTP_MALFORMED_PUSH | 0x1 | Invalid | Section 7.1 | | HTTP_MALFORMED_PUSH | 0x1 | Invalid | Section 7.1 |
| | 2 | push stream | | | | 2 | push stream | |
| | | header | | | | | header | |
| | | | | | | | | |
| HTTP_MALFORMED_MAX_PUSH_ID | 0x1 | Invalid | Section 7.1 | | HTTP_MALFORMED_MAX_PUSH_ID | 0x1 | Invalid | Section 7.1 |
| | 3 | MAX_PUSH_ID | | | | 3 | MAX_PUSH_ID | |
| | | frame | | | | | frame | |
| | | | |
| HTTP_UNEXPECTED_GOAWAY | 0x1 | A server | Section 7.1 |
| | 4 | received | |
| | | GOAWAY | |
| | | | |
| HTTP_MALFORMED_GOAWAY | 0x1 | Invalid | Section 7.1 |
| | 5 | GOAWAY | |
| | | frame | |
+-----------------------------+-----+-------------+-----------------+ +-----------------------------+-----+-------------+-----------------+
11. References 11. References
11.1. Normative References 11.1. Normative References
[QUIC-TRANSPORT] [QUIC-TRANSPORT]
Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
Multiplexed and Secure Transport", draft-ietf-quic- Multiplexed and Secure Transport", draft-ietf-quic-
transport-07 (work in progress), October 2017. transport-00 (work in progress), December 2017.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, [RFC0793] Postel, J., "Transmission Control Protocol", STD 7,
RFC 793, DOI 10.17487/RFC0793, September 1981, RFC 793, DOI 10.17487/RFC0793, September 1981,
<https://www.rfc-editor.org/info/rfc793>. <https://www.rfc-editor.org/info/rfc793>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
skipping to change at page 33, line 5 skipping to change at page 35, line 5
<https://www.rfc-editor.org/info/rfc7540>. <https://www.rfc-editor.org/info/rfc7540>.
[RFC7541] Peon, R. and H. Ruellan, "HPACK: Header Compression for [RFC7541] Peon, R. and H. Ruellan, "HPACK: Header Compression for
HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015, HTTP/2", RFC 7541, DOI 10.17487/RFC7541, May 2015,
<https://www.rfc-editor.org/info/rfc7541>. <https://www.rfc-editor.org/info/rfc7541>.
[RFC7838] Nottingham, M., McManus, P., and J. Reschke, "HTTP [RFC7838] Nottingham, M., McManus, P., and J. Reschke, "HTTP
Alternative Services", RFC 7838, DOI 10.17487/RFC7838, Alternative Services", RFC 7838, DOI 10.17487/RFC7838,
April 2016, <https://www.rfc-editor.org/info/rfc7838>. April 2016, <https://www.rfc-editor.org/info/rfc7838>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
11.2. Informative References 11.2. Informative References
[RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan,
"Transport Layer Security (TLS) Application-Layer Protocol "Transport Layer Security (TLS) Application-Layer Protocol
Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301,
July 2014, <https://www.rfc-editor.org/info/rfc7301>. July 2014, <https://www.rfc-editor.org/info/rfc7301>.
[RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for
Writing an IANA Considerations Section in RFCs", BCP 26, Writing an IANA Considerations Section in RFCs", BCP 26,
RFC 8126, DOI 10.17487/RFC8126, June 2017, RFC 8126, DOI 10.17487/RFC8126, June 2017,
<https://www.rfc-editor.org/info/rfc8126>. <https://www.rfc-editor.org/info/rfc8126>.
11.3. URIs 11.3. URIs
[1] https://mailarchive.ietf.org/arch/search/?email_list=quic [1] https://mailarchive.ietf.org/arch/search/?email_list=quic
[2] https://github.com/quicwg [2] https://github.com/quicwg
[3] https://github.com/quicwg/base-drafts/labels/http [3] https://github.com/quicwg/base-drafts/labels/-http
Appendix A. Contributors Appendix A. Contributors
The original authors of this specification were Robbie Shade and Mike The original authors of this specification were Robbie Shade and Mike
Warres. Warres.
A substantial portion of Mike's contribution was supported by
Microsoft during his employment there.
Appendix B. Change Log Appendix B. Change Log
*RFC Editor's Note:* Please remove this section prior to *RFC Editor's Note:* Please remove this section prior to
publication of a final version of this document. publication of a final version of this document.
B.1. Since draft-ietf-quic-http-06 B.1. Since draft-ietf-quic-http-07
Nothing yet. o Changes for integer encodings in QUIC (#595,#905)
B.2. Since draft-ietf-quic-http-05 B.2. Since draft-ietf-quic-http-06
o Track changes in QUIC error code usage (#485)
B.3. Since draft-ietf-quic-http-05
o Made push ID sequential, add MAX_PUSH_ID, remove o Made push ID sequential, add MAX_PUSH_ID, remove
SETTINGS_ENABLE_PUSH (#709) SETTINGS_ENABLE_PUSH (#709)
o Guidance about keep-alive and QUIC PINGs (#729) o Guidance about keep-alive and QUIC PINGs (#729)
o Expanded text on GOAWAY and cancellation (#757) o Expanded text on GOAWAY and cancellation (#757)
B.3. Since draft-ietf-quic-http-04 B.4. Since draft-ietf-quic-http-04
o Cite RFC 5234 (#404) o Cite RFC 5234 (#404)
o Return to a single stream per request (#245,#557) o Return to a single stream per request (#245,#557)
o Use separate frame type and settings registries from HTTP/2 (#81) o Use separate frame type and settings registries from HTTP/2 (#81)
o SETTINGS_ENABLE_PUSH instead of SETTINGS_DISABLE_PUSH (#477) o SETTINGS_ENABLE_PUSH instead of SETTINGS_DISABLE_PUSH (#477)
o Restored GOAWAY (#696) o Restored GOAWAY (#696)
o Identify server push using Push ID rather than a stream ID o Identify server push using Push ID rather than a stream ID
(#702,#281) (#702,#281)
o DATA frames cannot be empty (#700) o DATA frames cannot be empty (#700)
skipping to change at page 34, line 15 skipping to change at page 36, line 31
o SETTINGS_ENABLE_PUSH instead of SETTINGS_DISABLE_PUSH (#477) o SETTINGS_ENABLE_PUSH instead of SETTINGS_DISABLE_PUSH (#477)
o Restored GOAWAY (#696) o Restored GOAWAY (#696)
o Identify server push using Push ID rather than a stream ID o Identify server push using Push ID rather than a stream ID
(#702,#281) (#702,#281)
o DATA frames cannot be empty (#700) o DATA frames cannot be empty (#700)
B.4. Since draft-ietf-quic-http-03 B.5. Since draft-ietf-quic-http-03
None. None.
B.5. Since draft-ietf-quic-http-02 B.6. Since draft-ietf-quic-http-02
o Track changes in transport draft o Track changes in transport draft
B.6. Since draft-ietf-quic-http-01 B.7. Since draft-ietf-quic-http-01
o SETTINGS changes (#181): o SETTINGS changes (#181):
* SETTINGS can be sent only once at the start of a connection; no * SETTINGS can be sent only once at the start of a connection; no
changes thereafter changes thereafter
* SETTINGS_ACK removed * SETTINGS_ACK removed
* Settings can only occur in the SETTINGS frame a single time * Settings can only occur in the SETTINGS frame a single time
skipping to change at page 35, line 5 skipping to change at page 37, line 18
o Closing the connection control stream or any message control o Closing the connection control stream or any message control
stream is a fatal error (#176) stream is a fatal error (#176)
o HPACK Sequence counter can wrap (#173) o HPACK Sequence counter can wrap (#173)
o 0-RTT guidance added o 0-RTT guidance added
o Guide to differences from HTTP/2 and porting HTTP/2 extensions o Guide to differences from HTTP/2 and porting HTTP/2 extensions
added (#127,#242) added (#127,#242)
B.7. Since draft-ietf-quic-http-00 B.8. Since draft-ietf-quic-http-00
o Changed "HTTP/2-over-QUIC" to "HTTP/QUIC" throughout (#11,#29) o Changed "HTTP/2-over-QUIC" to "HTTP/QUIC" throughout (#11,#29)
o Changed from using HTTP/2 framing within Stream 3 to new framing o Changed from using HTTP/2 framing within Stream 3 to new framing
format and two-stream-per-request model (#71,#72,#73) format and two-stream-per-request model (#71,#72,#73)
o Adopted SETTINGS format from draft-bishop-httpbis-extended- o Adopted SETTINGS format from draft-bishop-httpbis-extended-
settings-01 settings-01
o Reworked SETTINGS_ACK to account for indeterminate inter-stream o Reworked SETTINGS_ACK to account for indeterminate inter-stream
order (#75) order (#75)
o Described CONNECT pseudo-method (#95) o Described CONNECT pseudo-method (#95)
o Updated ALPN token and Alt-Svc guidance (#13,#87) o Updated ALPN token and Alt-Svc guidance (#13,#87)
o Application-layer-defined error codes (#19,#74) o Application-layer-defined error codes (#19,#74)
B.8. Since draft-shade-quic-http2-mapping-00 B.9. Since draft-shade-quic-http2-mapping-00
o Adopted as base for draft-ietf-quic-http o Adopted as base for draft-ietf-quic-http
o Updated authors/editors list o Updated authors/editors list
Author's Address Author's Address
Mike Bishop (editor) Mike Bishop (editor)
Microsoft Akamai
Email: Michael.Bishop@microsoft.com Email: mbishop@evequefou.be
 End of changes. 89 change blocks. 
224 lines changed or deleted 325 lines changed or added

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