draft-ietf-quic-http-14.txt   draft-ietf-quic-http-latest.txt 
QUIC Working Group M. Bishop, Ed. QUIC Working Group M. Bishop, Ed.
Internet-Draft Akamai Internet-Draft Akamai
Intended status: Standards Track August 15, 2018 Intended status: Standards Track September 19, 2018
Expires: February 16, 2019 Expires: March 23, 2019
Hypertext Transfer Protocol (HTTP) over QUIC Hypertext Transfer Protocol (HTTP) over QUIC
draft-ietf-quic-http-14 draft-ietf-quic-http-latest
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.
skipping to change at page 1, line 45 skipping to change at page 1, line 45
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 February 16, 2019. This Internet-Draft will expire on March 23, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Notational Conventions . . . . . . . . . . . . . . . . . 4 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 4
2. Connection Setup and Management . . . . . . . . . . . . . . . 4 2. Connection Setup and Management . . . . . . . . . . . . . . . 4
2.1. Draft Version Identification . . . . . . . . . . . . . . 4 2.1. Draft Version Identification . . . . . . . . . . . . . . 4
2.2. Discovering an HTTP/QUIC Endpoint . . . . . . . . . . . . 5 2.2. Discovering an HTTP/QUIC Endpoint . . . . . . . . . . . . 5
2.2.1. QUIC Version Hints . . . . . . . . . . . . . . . . . 5 2.2.1. QUIC Version Hints . . . . . . . . . . . . . . . . . 5
2.3. Connection Establishment . . . . . . . . . . . . . . . . 6 2.3. Connection Establishment . . . . . . . . . . . . . . . . 6
2.4. Connection Reuse . . . . . . . . . . . . . . . . . . . . 6 2.4. Connection Reuse . . . . . . . . . . . . . . . . . . . . 7
3. Stream Mapping and Usage . . . . . . . . . . . . . . . . . . 7 3. Stream Mapping and Usage . . . . . . . . . . . . . . . . . . 7
3.1. HTTP Message Exchanges . . . . . . . . . . . . . . . . . 7 3.1. HTTP Message Exchanges . . . . . . . . . . . . . . . . . 8
3.1.1. Header Formatting and Compression . . . . . . . . . . 9 3.1.1. Header Formatting and Compression . . . . . . . . . . 9
3.1.2. The CONNECT Method . . . . . . . . . . . . . . . . . 9 3.1.2. The CONNECT Method . . . . . . . . . . . . . . . . . 10
3.1.3. Request Cancellation . . . . . . . . . . . . . . . . 10 3.1.3. Request Cancellation . . . . . . . . . . . . . . . . 11
3.2. Request Prioritization . . . . . . . . . . . . . . . . . 11 3.2. Request Prioritization . . . . . . . . . . . . . . . . . 11
3.2.1. Placeholders . . . . . . . . . . . . . . . . . . . . 11 3.2.1. Placeholders . . . . . . . . . . . . . . . . . . . . 12
3.2.2. Priority Tree Maintenance . . . . . . . . . . . . . . 12 3.2.2. Priority Tree Maintenance . . . . . . . . . . . . . . 12
3.3. Unidirectional Streams . . . . . . . . . . . . . . . . . 13 3.3. Unidirectional Streams . . . . . . . . . . . . . . . . . 13
3.3.1. Reserved Stream Types . . . . . . . . . . . . . . . . 13 3.3.1. Reserved Stream Types . . . . . . . . . . . . . . . . 14
3.3.2. Control Streams . . . . . . . . . . . . . . . . . . . 14 3.3.2. Control Streams . . . . . . . . . . . . . . . . . . . 14
3.3.3. Server Push . . . . . . . . . . . . . . . . . . . . . 14 3.3.3. Server Push . . . . . . . . . . . . . . . . . . . . . 14
4. HTTP Framing Layer . . . . . . . . . . . . . . . . . . . . . 15 4. HTTP Framing Layer . . . . . . . . . . . . . . . . . . . . . 16
4.1. Frame Layout . . . . . . . . . . . . . . . . . . . . . . 16 4.1. Frame Layout . . . . . . . . . . . . . . . . . . . . . . 16
4.2. Frame Definitions . . . . . . . . . . . . . . . . . . . . 16 4.2. Frame Definitions . . . . . . . . . . . . . . . . . . . . 16
4.2.1. Reserved Frame Types . . . . . . . . . . . . . . . . 16 4.2.1. Reserved Frame Types . . . . . . . . . . . . . . . . 16
4.2.2. DATA . . . . . . . . . . . . . . . . . . . . . . . . 16 4.2.2. DATA . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.3. HEADERS . . . . . . . . . . . . . . . . . . . . . . . 17 4.2.3. HEADERS . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.4. PRIORITY . . . . . . . . . . . . . . . . . . . . . . 17 4.2.4. PRIORITY . . . . . . . . . . . . . . . . . . . . . . 17
4.2.5. CANCEL_PUSH . . . . . . . . . . . . . . . . . . . . . 19 4.2.5. CANCEL_PUSH . . . . . . . . . . . . . . . . . . . . . 20
4.2.6. SETTINGS . . . . . . . . . . . . . . . . . . . . . . 20 4.2.6. SETTINGS . . . . . . . . . . . . . . . . . . . . . . 20
4.2.7. PUSH_PROMISE . . . . . . . . . . . . . . . . . . . . 23 4.2.7. PUSH_PROMISE . . . . . . . . . . . . . . . . . . . . 23
4.2.8. GOAWAY . . . . . . . . . . . . . . . . . . . . . . . 24 4.2.8. GOAWAY . . . . . . . . . . . . . . . . . . . . . . . 24
4.2.9. MAX_PUSH_ID . . . . . . . . . . . . . . . . . . . . . 26 4.2.9. MAX_PUSH_ID . . . . . . . . . . . . . . . . . . . . . 25
5. Connection Management . . . . . . . . . . . . . . . . . . . . 27 5. Connection Closure . . . . . . . . . . . . . . . . . . . . . 25
6. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 27 5.1. Idle Connections . . . . . . . . . . . . . . . . . . . . 26
6.1. HTTP/QUIC Error Codes . . . . . . . . . . . . . . . . . . 27 5.2. Connection Shutdown . . . . . . . . . . . . . . . . . . . 26
7. Extensions to HTTP/QUIC . . . . . . . . . . . . . . . . . . . 29 5.3. Immediate Application Closure . . . . . . . . . . . . . . 27
5.4. Transport Closure . . . . . . . . . . . . . . . . . . . . 28
6. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 28
6.1. HTTP/QUIC Error Codes . . . . . . . . . . . . . . . . . . 28
7. Extensions to HTTP/QUIC . . . . . . . . . . . . . . . . . . . 30
8. Considerations for Transitioning from HTTP/2 . . . . . . . . 30 8. Considerations for Transitioning from HTTP/2 . . . . . . . . 30
8.1. Streams . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.1. Streams . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.2. HTTP Frame Types . . . . . . . . . . . . . . . . . . . . 30 8.2. HTTP Frame Types . . . . . . . . . . . . . . . . . . . . 31
8.3. HTTP/2 SETTINGS Parameters . . . . . . . . . . . . . . . 32 8.3. HTTP/2 SETTINGS Parameters . . . . . . . . . . . . . . . 33
8.4. HTTP/2 Error Codes . . . . . . . . . . . . . . . . . . . 33 8.4. HTTP/2 Error Codes . . . . . . . . . . . . . . . . . . . 34
9. Security Considerations . . . . . . . . . . . . . . . . . . . 34 9. Security Considerations . . . . . . . . . . . . . . . . . . . 35
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35
10.1. Registration of HTTP/QUIC Identification String . . . . 34 10.1. Registration of HTTP/QUIC Identification String . . . . 35
10.2. Registration of QUIC Version Hint Alt-Svc Parameter . . 35 10.2. Registration of QUIC Version Hint Alt-Svc Parameter . . 36
10.3. Frame Types . . . . . . . . . . . . . . . . . . . . . . 35 10.3. Frame Types . . . . . . . . . . . . . . . . . . . . . . 36
10.4. Settings Parameters . . . . . . . . . . . . . . . . . . 36 10.4. Settings Parameters . . . . . . . . . . . . . . . . . . 37
10.5. Error Codes . . . . . . . . . . . . . . . . . . . . . . 37 10.5. Error Codes . . . . . . . . . . . . . . . . . . . . . . 38
10.6. Stream Types . . . . . . . . . . . . . . . . . . . . . . 40 10.6. Stream Types . . . . . . . . . . . . . . . . . . . . . . 41
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 40 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 41
11.1. Normative References . . . . . . . . . . . . . . . . . . 41 11.1. Normative References . . . . . . . . . . . . . . . . . . 42
11.2. Informative References . . . . . . . . . . . . . . . . . 42 11.2. Informative References . . . . . . . . . . . . . . . . . 43
11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 42 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 43
A.1. Since draft-ietf-quic-http-13 . . . . . . . . . . . . . . 42 A.1. Since draft-ietf-quic-http-13 . . . . . . . . . . . . . . 43
A.2. Since draft-ietf-quic-http-12 . . . . . . . . . . . . . . 42 A.2. Since draft-ietf-quic-http-12 . . . . . . . . . . . . . . 44
A.3. Since draft-ietf-quic-http-11 . . . . . . . . . . . . . . 43 A.3. Since draft-ietf-quic-http-11 . . . . . . . . . . . . . . 44
A.4. Since draft-ietf-quic-http-10 . . . . . . . . . . . . . . 43 A.4. Since draft-ietf-quic-http-10 . . . . . . . . . . . . . . 44
A.5. Since draft-ietf-quic-http-09 . . . . . . . . . . . . . . 43 A.5. Since draft-ietf-quic-http-09 . . . . . . . . . . . . . . 44
A.6. Since draft-ietf-quic-http-08 . . . . . . . . . . . . . . 43 A.6. Since draft-ietf-quic-http-08 . . . . . . . . . . . . . . 44
A.7. Since draft-ietf-quic-http-07 . . . . . . . . . . . . . . 43 A.7. Since draft-ietf-quic-http-07 . . . . . . . . . . . . . . 44
A.8. Since draft-ietf-quic-http-06 . . . . . . . . . . . . . . 44 A.8. Since draft-ietf-quic-http-06 . . . . . . . . . . . . . . 45
A.9. Since draft-ietf-quic-http-05 . . . . . . . . . . . . . . 44 A.9. Since draft-ietf-quic-http-05 . . . . . . . . . . . . . . 45
A.10. Since draft-ietf-quic-http-04 . . . . . . . . . . . . . . 44 A.10. Since draft-ietf-quic-http-04 . . . . . . . . . . . . . . 45
A.11. Since draft-ietf-quic-http-03 . . . . . . . . . . . . . . 44 A.11. Since draft-ietf-quic-http-03 . . . . . . . . . . . . . . 45
A.12. Since draft-ietf-quic-http-02 . . . . . . . . . . . . . . 44 A.12. Since draft-ietf-quic-http-02 . . . . . . . . . . . . . . 45
A.13. Since draft-ietf-quic-http-01 . . . . . . . . . . . . . . 44 A.13. Since draft-ietf-quic-http-01 . . . . . . . . . . . . . . 45
A.14. Since draft-ietf-quic-http-00 . . . . . . . . . . . . . . 45 A.14. Since draft-ietf-quic-http-00 . . . . . . . . . . . . . . 46
A.15. Since draft-shade-quic-http2-mapping-00 . . . . . . . . . 45 A.15. Since draft-shade-quic-http2-mapping-00 . . . . . . . . . 46
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 45 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 46
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 46 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 47
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.
skipping to change at page 5, line 11 skipping to change at page 5, line 19
For example, an experimental implementation based on draft-ietf-quic- For example, an experimental implementation based on draft-ietf-quic-
http-09 which reserves an extra stream for unsolicited transmission http-09 which reserves an extra stream for unsolicited transmission
of 1980s pop music might identify itself as "hq-09-rickroll". Note of 1980s pop music might identify itself as "hq-09-rickroll". Note
that any label MUST conform to the "token" syntax defined in that any label MUST conform to the "token" syntax defined in
Section 3.2.6 of [RFC7230]. Experimenters are encouraged to Section 3.2.6 of [RFC7230]. Experimenters are encouraged to
coordinate their experiments on the quic@ietf.org mailing list. coordinate their experiments on the quic@ietf.org mailing list.
2.2. Discovering an HTTP/QUIC Endpoint 2.2. Discovering an HTTP/QUIC Endpoint
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 field or the HTTP/2
frame ([RFC7838]), using the ALPN token defined in Section 2.3. ALTSVC frame ([ALTSVC]), using the ALPN token defined in Section 2.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 field in any response:
Alt-Svc: hq=":50781" Alt-Svc: hq=":50781"
On receipt of an Alt-Svc record indicating HTTP/QUIC support, a On receipt of an Alt-Svc record indicating HTTP/QUIC support, a
client MAY attempt to establish a QUIC connection to the indicated client MAY attempt to establish a QUIC connection to the indicated
host and port and, if successful, send HTTP requests using the host and port and, if successful, send HTTP requests using the
mapping described in this document. mapping described in this document.
Connectivity problems (e.g. firewall blocking UDP) can result in QUIC Connectivity problems (e.g. firewall blocking UDP) can result in QUIC
connection establishment failure, in which case the client SHOULD connection establishment failure, in which case the client SHOULD
skipping to change at page 5, line 44 skipping to change at page 6, line 4
This document defines the "quic" parameter for Alt-Svc, which MAY be This document defines the "quic" parameter for Alt-Svc, which MAY be
used to provide version-negotiation hints to HTTP/QUIC clients. QUIC used to provide version-negotiation hints to HTTP/QUIC clients. QUIC
versions are four-octet sequences with no additional constraints on versions are four-octet sequences with no additional constraints on
format. Leading zeros SHOULD be omitted for brevity. format. Leading zeros SHOULD be omitted for brevity.
Syntax: Syntax:
quic = DQUOTE version-number [ "," version-number ] * DQUOTE quic = DQUOTE version-number [ "," version-number ] * DQUOTE
version-number = 1*8HEXDIG; hex-encoded QUIC version version-number = 1*8HEXDIG; hex-encoded QUIC version
Where multiple versions are listed, the order of the values reflects Where multiple versions are listed, the order of the values reflects
the server's preference (with the first value being the most the server's preference (with the first value being the most
preferred version). Reserved versions MAY be listed, but unreserved preferred version). Reserved versions MAY be listed, but unreserved
versions which are not supported by the alternative SHOULD NOT be versions which are not supported by the alternative SHOULD NOT be
present in the list. Origins MAY omit supported versions for any present in the list. Origins MAY omit supported versions for any
reason. reason.
Clients MUST ignore any included versions which they do not support. Clients MUST ignore any included versions which they do not support.
The "quic" parameter MUST NOT occur more than once; clients SHOULD The "quic" parameter MUST NOT occur more than once; clients SHOULD
process only the first occurrence. process only the first occurrence.
For example, suppose a server supported both version 0x00000001 and For example, suppose a server supported both version 0x00000001 and
the version rendered in ASCII as "Q034". If it opted to include the the version rendered in ASCII as "Q034". If it opted to include the
reserved versions (from Section 4 of [QUIC-TRANSPORT]) 0x0 and reserved versions (from Section 4 of [QUIC-TRANSPORT]) 0x0 and
0x1abadaba, it could specify the following header: 0x1abadaba, it could specify the following header field:
Alt-Svc: hq=":49288";quic="1,1abadaba,51303334,0" Alt-Svc: hq=":49288";quic="1,1abadaba,51303334,0"
A client acting on this header would drop the reserved versions A client acting on this header field would drop the reserved versions
(because it does not support them), then attempt to connect to the (because it does not support them), then attempt to connect to the
alternative using the first version in the list which it does alternative using the first version in the list which it does
support. support.
2.3. Connection Establishment 2.3. Connection Establishment
HTTP/QUIC relies on QUIC as the underlying transport. The QUIC HTTP/QUIC relies on QUIC as the underlying transport. The QUIC
version being used MUST use TLS version 1.3 or greater as its version being used MUST use TLS version 1.3 or greater as its
handshake protocol. HTTP/QUIC clients MUST indicate the target handshake protocol. HTTP/QUIC clients MUST indicate the target
domain name during the TLS handshake. This may be done using the domain name during the TLS handshake. This may be done using the
skipping to change at page 7, line 16 skipping to change at page 7, line 26
nominated server can present a valid certificate for the origin nominated server can present a valid certificate for the origin
before considering it authoritative. Clients MUST NOT assume that an before considering it authoritative. Clients MUST NOT assume that an
HTTP/QUIC endpoint is authoritative for other origins without an HTTP/QUIC endpoint is authoritative for other origins without an
explicit signal. explicit signal.
A server that does not wish clients to reuse connections for a A server that does not wish clients to reuse connections for a
particular origin can indicate that it is not authoritative for a particular origin can indicate that it is not authoritative for a
request by sending a 421 (Misdirected Request) status code in request by sending a 421 (Misdirected Request) status code in
response to the request (see Section 9.1.2 of [RFC7540]). response to the request (see Section 9.1.2 of [RFC7540]).
The considerations discussed in Section 9.1 of [RFC7540] also apply
to the management of HTTP/QUIC connections.
3. Stream Mapping and Usage 3. 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.
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
skipping to change at page 8, line 8 skipping to change at page 8, line 21
3.1. HTTP Message Exchanges 3.1. HTTP Message Exchanges
A client sends an HTTP request on a client-initiated bidirectional A client sends an HTTP request on a client-initiated bidirectional
QUIC stream. A server sends an HTTP response on the same stream as QUIC stream. A server sends an HTTP response on the same stream as
the request. the request.
An HTTP message (request or response) consists of: An HTTP message (request or response) consists of:
1. one header block (see Section 4.2.3) containing the message 1. one header block (see Section 4.2.3) containing the message
headers (see [RFC7230], Section 3.2), header (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 4.2.2), of DATA frames (see Section 4.2.2),
3. optionally, one header block containing the trailer-part, if 3. optionally, one header block containing the trailer-part, if
present (see [RFC7230], Section 4.1.2). present (see [RFC7230], Section 4.1.2).
In addition, prior to sending the message header block indicated In addition, prior to sending the message header block indicated
above, a response may contain zero or more header blocks containing above, a response may contain zero or more header blocks containing
the message headers of informational (1xx) HTTP responses (see the message headers of informational (1xx) HTTP responses (see
[RFC7230], Section 3.2 and [RFC7231], Section 6.2). [RFC7230], Section 3.2 and [RFC7231], Section 6.2).
PUSH_PROMISE frames (see Section 4.2.7) MAY be interleaved with the A server MAY interleave one or more PUSH_PROMISE frames (see
frames of a response message indicating a pushed resource related to Section 4.2.7) with the frames of a response message. These
the response. These PUSH_PROMISE frames are not part of the PUSH_PROMISE frames are not part of the response; see Section 3.3.3
response, but carry the headers of a separate HTTP request message. for more details.
See Section 3.3.3 for more details.
The "chunked" transfer encoding defined in Section 4.1 of [RFC7230] The "chunked" transfer encoding defined in Section 4.1 of [RFC7230]
MUST NOT be used. MUST NOT be used.
Trailing header fields are carried in an additional header block Trailing header fields are carried in an additional header block
following the body. Senders MUST send only one header block in the following the body. Senders MUST send only one header block in the
trailers section; receivers MUST discard any subsequent header trailers section; receivers MUST discard any subsequent header
blocks. blocks.
An HTTP request/response exchange fully consumes a bidirectional QUIC An HTTP request/response exchange fully consumes a bidirectional QUIC
skipping to change at page 9, line 12 skipping to change at page 9, line 26
RST_STREAM with any error code, do not affect the state of the RST_STREAM with any error code, do not affect the state of the
server's response. Servers do not abort a response in progress server's response. Servers do not abort a response in progress
solely due to a state change on the request stream. However, if the solely due to a state change on the request stream. However, if the
request stream terminates without containing a usable HTTP request, request stream terminates without containing a usable HTTP request,
the server SHOULD abort its response with the error code the server SHOULD abort its response with the error code
HTTP_INCOMPLETE_REQUEST. HTTP_INCOMPLETE_REQUEST.
3.1.1. Header Formatting and Compression 3.1.1. Header Formatting and Compression
HTTP header fields carry information as a series of key-value pairs. HTTP header fields carry information as a series of key-value pairs.
For a listing of registered HTTP headers, see the "Message Header For a listing of registered HTTP header fields, see the "Message
Field" registry maintained at https://www.iana.org/assignments/ Header Field" registry maintained at
message-headers [4]. https://www.iana.org/assignments/message-headers [4].
Just as in previous versions of HTTP, header field names are strings Just as in previous versions of HTTP, header field names are strings
of ASCII characters that are compared in a case-insensitive fashion. of ASCII characters that are compared in a case-insensitive fashion.
Properties of HTTP header names and values are discussed in more Properties of HTTP header field names and values are discussed in
detail in Section 3.2 of [RFC7230], though the wire rendering in more detail in Section 3.2 of [RFC7230], though the wire rendering in
HTTP/QUIC differs. As in HTTP/2, header field names MUST be HTTP/QUIC differs. As in HTTP/2, header field names MUST be
converted to lowercase prior to their encoding. A request or converted to lowercase prior to their encoding. A request or
response containing uppercase header field names MUST be treated as response containing uppercase header field names MUST be treated as
malformed. malformed.
As in HTTP/2, HTTP/QUIC uses special pseudo-header fields beginning As in HTTP/2, HTTP/QUIC uses special pseudo-header fields beginning
with ':' character (ASCII 0x3a) to convey the target URI, the method with ':' character (ASCII 0x3a) to convey the target URI, the method
of the request, and the status code for the response. These pseudo- of the request, and the status code for the response. These pseudo-
header fields are defined in Section 8.1.2.3 and 8.1.2.4 of header fields are defined in Section 8.1.2.3 and 8.1.2.4 of
[RFC7540]. Pseudo-header fields are not HTTP header fields. [RFC7540]. Pseudo-header fields are not HTTP header fields.
skipping to change at page 10, line 27 skipping to change at page 10, line 41
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
ends the request stream (that is, the receive stream at the proxy 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 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 terminate the send stream that it sends to the FIN bit set, it will terminate the send stream that it sends to
client. TCP connections which remain half-closed in a single client. TCP connections which remain half-closed in a single
direction are not invalid, but are often handled poorly by servers, direction are not invalid, but are often handled poorly by servers,
so clients SHOULD NOT cause send a STREAM frame with a FIN bit for so clients SHOULD NOT close a stream for sending while they still
connections on which they are still expecting data. expect to receive data from the target of the CONNECT.
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 6.1). Correspondingly, a proxy MUST send HTTP_CONNECT_ERROR (Section 6.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.
3.1.3. Request Cancellation 3.1.3. Request Cancellation
skipping to change at page 15, line 6 skipping to change at page 15, line 19
to fulfill promises in the order that best suits its needs. The same to fulfill promises in the order that best suits its needs. The same
Push ID can be used in multiple PUSH_PROMISE frames (see Push ID can be used in multiple PUSH_PROMISE frames (see
Section 4.2.7). When a server later fulfills a promise, the server Section 4.2.7). When a server later fulfills a promise, the server
push response is conveyed on a push stream. push response is conveyed on a push stream.
A push stream is indicated by a stream type of "0x50" (ASCII 'P'), A push stream is indicated by a stream type of "0x50" (ASCII 'P'),
followed by the Push ID of the promise that it fulfills, encoded as a followed by the Push ID of the promise that it fulfills, encoded as a
variable-length integer. The remaining data on this stream consists variable-length integer. The remaining data on this stream consists
of HTTP/QUIC frames, as defined in Section 4.2, and carries the of HTTP/QUIC frames, as defined in Section 4.2, and carries the
response side of an HTTP message exchange as described in response side of an HTTP message exchange as described in
Section 3.1. The request headers of the exchange are carried by a Section 3.1. The header of the request message is carried by a
PUSH_PROMISE frame (see Section 4.2.7) on the request stream which PUSH_PROMISE frame (see Section 4.2.7) on the request stream which
generated the push. Promised requests MUST conform to the generated the push. Promised requests MUST conform to the
requirements in Section 8.2 of [RFC7540]. requirements in Section 8.2 of [RFC7540].
Only servers can push; if a server receives a client-initiated push Only servers can push; if a server receives a client-initiated push
stream, this MUST be treated as a stream error of type stream, this MUST be treated as a stream error of type
HTTP_WRONG_STREAM_DIRECTION. HTTP_WRONG_STREAM_DIRECTION.
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
skipping to change at page 16, line 22 skipping to change at page 16, line 33
| Length (i) ... | Length (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type (8) | Frame Payload (*) ... | Type (8) | Frame Payload (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 4: HTTP/QUIC frame format Figure 4: HTTP/QUIC frame format
A frame includes the following fields: A frame includes the following fields:
Length: A variable-length integer that describes the length of the Length: A variable-length integer that describes the length of the
Frame Payload. This length does not include the frame header. Frame Payload. This length does not include the Type field.
Type: An 8-bit type for the frame. Type: An 8-bit type for the frame.
Frame Payload: A payload, the semantics of which are determined by Frame Payload: A payload, the semantics of which are determined by
the Type field. the Type field.
4.2. Frame Definitions 4.2. Frame Definitions
4.2.1. Reserved Frame Types 4.2.1. Reserved Frame Types
skipping to change at page 20, line 5 skipping to change at page 20, line 16
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 Section 4.2.7) frame identifies a server push request by Push ID (see Section 4.2.7)
using a variable-length integer. 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 send 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
skipping to change at page 21, line 4 skipping to change at page 21, line 15
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
of the sending peer, which can be used by the receiving peer. of the sending peer, which can be used by the receiving peer.
However, a negotiation can be implied by the use of SETTINGS - a peer However, a negotiation can be implied by the use of SETTINGS - a peer
uses SETTINGS to advertise a set of supported values. The recipient uses SETTINGS to advertise a set of supported values. The recipient
can then choose which entries from this list are also acceptable and can then choose which entries from this list are also acceptable and
proceed with the value it has chosen. (This choice could be proceed with the value it has chosen. (This choice could be
announced in a field of an extension frame, or in its own value in announced in a field of an extension frame, or in its own value in
SETTINGS.) SETTINGS.)
Different values for the same parameter can be advertised by each Different values for the same parameter can be advertised by each
peer. For example, a client might be willing to consume very large peer. For example, a client might be willing to consume a very large
response headers, while servers are more cautious about request size. response header, while servers are more cautious about request size.
Parameters MUST NOT occur more than once. A receiver MAY treat the Parameters MUST NOT occur more than once. A receiver MAY treat the
presence of the same parameter more than once as a connection error presence of the same parameter more than once as a connection error
of type HTTP_MALFORMED_FRAME. of type HTTP_MALFORMED_FRAME.
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
skipping to change at page 21, line 40 skipping to change at page 22, line 4
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_FRAME. and trigger a connection error of type HTTP_MALFORMED_FRAME.
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 either control A SETTINGS frame MUST be sent as the first frame of either control
stream (see Section 3) by each peer, and MUST NOT be sent stream (see Section 3) 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 a
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_MALFORMED_FRAME. connection error of type HTTP_MALFORMED_FRAME.
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 6) of type HTTP_MALFORMED_FRAME. (Section 6) of type HTTP_MALFORMED_FRAME.
4.2.6.1. Integer encoding 4.2.6.1. Integer encoding
skipping to change at page 23, line 27 skipping to change at page 23, line 38
Figure 10: PUSH_PROMISE frame payload Figure 10: PUSH_PROMISE frame payload
The payload consists of: The payload consists of:
Push ID: A variable-length integer that identifies the server push Push ID: A variable-length integer that identifies the server push
request. A push ID is used in push stream header (Section 3.3.3), request. A push ID is used in push stream header (Section 3.3.3),
CANCEL_PUSH frames (Section 4.2.5), and PRIORITY frames CANCEL_PUSH frames (Section 4.2.5), and PRIORITY frames
(Section 4.2.4). (Section 4.2.4).
Header Block: QPACK-compressed request headers for the promised Header Block: QPACK-compressed request header fields for the
response. See [QPACK] for more details. promised response. See [QPACK] for more details.
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 4.2.9). A client MUST treat provided in a MAX_PUSH_ID frame (Section 4.2.9). 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_FRAME. HTTP_MALFORMED_FRAME.
A server MAY use the same Push ID in multiple PUSH_PROMISE frames. A server MAY use the same Push ID in multiple PUSH_PROMISE frames.
This allows the server to use the same server push in response to This allows the server to use the same server push in response to
multiple concurrent requests. Referencing the same server push multiple concurrent requests. Referencing the same server push
skipping to change at page 24, line 40 skipping to change at page 24, line 52
Clients do not need to send GOAWAY to initiate a graceful shutdown; Clients do not need to send GOAWAY to initiate a graceful shutdown;
they simply stop making new requests. A server MUST treat receipt of they simply stop making new requests. A server MUST treat receipt of
a GOAWAY frame as a connection error (Section 6) of type a GOAWAY frame as a connection error (Section 6) of type
HTTP_UNEXPECTED_GOAWAY. HTTP_UNEXPECTED_GOAWAY.
The GOAWAY frame applies to the connection, not a specific stream. The GOAWAY frame applies to the connection, not a specific stream.
An endpoint MUST treat a GOAWAY frame on a stream other than the An endpoint MUST treat a GOAWAY frame on a stream other than the
control stream as a connection error (Section 6) of type control stream as a connection error (Section 6) of type
HTTP_WRONG_STREAM. HTTP_WRONG_STREAM.
New client requests might already have been sent before the client See Section 5.2 for more information on the use of the GOAWAY frame.
receives the server's GOAWAY frame. The GOAWAY frame contains the
Stream ID of the last client-initiated request that was or might be
processed in this connection, which enables client and server to
agree on which requests were accepted prior to the connection
shutdown. This identifier MAY be lower than the stream limit
identified by a QUIC MAX_STREAM_ID frame, and MAY be zero if no
requests were processed. Servers SHOULD NOT increase the
MAX_STREAM_ID limit after sending a GOAWAY frame.
Once sent, the server MUST cancel requests sent on streams with an
identifier higher than the included last Stream ID. Clients MUST NOT
send new requests on the connection after receiving GOAWAY, although
requests might already be in transit. A new connection can be
established for new requests.
If the client has sent requests on streams with a higher Stream ID
than indicated in the GOAWAY frame, those requests are considered
cancelled (Section 3.1.3). Clients SHOULD reset any streams above
this ID with the error code HTTP_REQUEST_CANCELLED. Servers MAY also
cancel requests on streams below the indicated ID if these requests
were not processed.
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
until they are completed successfully, reset individually, or the
connection terminates.
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
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
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
send a GOAWAY frame to indicate what streams it might have acted on.
For unexpected closures caused by error conditions, a QUIC
APPLICATION_CLOSE frame MUST be used. However, a GOAWAY MAY be sent
first to provide additional detail to clients and to allow the client
to retry requests. Including the GOAWAY frame in the same packet as
the QUIC 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).
An endpoint MAY send multiple GOAWAY frames if circumstances change.
For instance, an endpoint that sends GOAWAY without an error code
during graceful shutdown could subsequently encounter an error
condition. The last stream identifier from the last GOAWAY frame
received indicates which streams could have been acted upon. A
server MUST NOT increase the value they send in the last Stream ID,
since clients might already have retried unprocessed requests on
another connection.
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
attempting to gracefully shut down a connection SHOULD send an
initial GOAWAY frame with the last Stream ID set to the current value
of QUIC's MAX_STREAM_ID and SHOULD NOT increase the MAX_STREAM_ID
thereafter. This signals to the client that a shutdown is imminent
and that initiating further requests is prohibited. After allowing
time for any in-flight requests (at least one round-trip time), the
server MAY send another GOAWAY frame with an updated last Stream ID.
This ensures that a connection can be cleanly shut down without
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.
4.2.9. MAX_PUSH_ID 4.2.9. 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.
skipping to change at page 27, line 16 skipping to change at page 25, line 47
identifies the maximum value for a Push ID that the server can use identifies the maximum value for a Push ID that the server can use
(see Section 4.2.7). A MAX_PUSH_ID frame cannot reduce the maximum (see Section 4.2.7). A MAX_PUSH_ID frame cannot reduce the maximum
Push 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_FRAME. HTTP_MALFORMED_FRAME.
A server MUST treat a MAX_PUSH_ID frame payload that does not contain A server MUST treat a MAX_PUSH_ID frame payload that does not contain
a single variable-length integer as a connection error of type a single variable-length integer as a connection error of type
HTTP_MALFORMED_FRAME. HTTP_MALFORMED_FRAME.
5. Connection Management 5. Connection Closure
QUIC connections are persistent. All of the considerations in Once established, an HTTP/QUIC connection can be used for many
Section 9.1 of [RFC7540] apply to the management of QUIC connections. requests and responses over time until the connection is closed.
Connection closure can happen in any of several different ways.
5.1. Idle Connections
Each QUIC endpoint declares an idle timeout during the handshake. If
the connection remains idle (no packets received) for longer than
this duration, the peer will assume that the connection has been
closed. HTTP/QUIC implementations will need to open a new connection
for new requests if the existing connection has been idle for longer
than the server's advertised idle timeout, and SHOULD do so if
approaching the idle timeout.
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 while there are responses outstanding for requests or server
A client SHOULD NOT use PING frames for this purpose unless there are pushes. If the client is not expecting a response from the server,
responses outstanding for requests or server pushes. If the client allowing an idle connection to time out is preferred over expending
is not expecting a response from the server, allowing an idle effort maintaining a connection that might not be needed. A gateway
connection to time out (based on the idle_timeout transport MAY use PING to maintain connections in anticipation of need rather
parameter) is preferred over expending effort maintaining a than incur the latency cost of connection establishment to servers.
connection that might not be needed. A gateway MAY use PING to Servers SHOULD NOT use PING frames to keep a connection open.
maintain connections in anticipation of need rather than incur the
latency cost of connection establishment to servers. 5.2. Connection Shutdown
Even when a connection is not idle, either endpoint can decide to
stop using the connection and let the connection close gracefully.
Since clients drive request generation, clients perform a connection
shutdown by not sending additional requests on the connection;
responses and pushed responses associated to previous requests will
continue to completion. Servers perform the same function by
communicating with clients.
Servers initiate the shutdown of a connection by sending a GOAWAY
frame (Section 4.2.8). The GOAWAY frame indicates that client-
initiated requests on lower stream IDs were or might be processed in
this connection, while requests on the indicated stream ID and
greater were not accepted. This enables client and server to agree
on which requests were accepted prior to the connection shutdown.
This identifier MAY be lower than the stream limit identified by a
QUIC MAX_STREAM_ID frame, and MAY be zero if no requests were
processed. Servers SHOULD NOT increase the QUIC MAX_STREAM_ID limit
after sending a GOAWAY frame.
Once sent, the server MUST cancel requests sent on streams with an
identifier higher than the indicated last Stream ID. Clients MUST
NOT send new requests on the connection after receiving GOAWAY,
although requests might already be in transit. A new connection can
be established for new requests.
If the client has sent requests on streams with a higher Stream ID
than indicated in the GOAWAY frame, those requests are considered
cancelled (Section 3.1.3). Clients SHOULD reset any streams above
this ID with the error code HTTP_REQUEST_CANCELLED. Servers MAY also
cancel requests on streams below the indicated ID if these requests
were not processed.
Requests on Stream IDs less than the Stream ID in the GOAWAY frame
might have been processed; their status cannot be known until they
are completed successfully, reset individually, or the connection
terminates.
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
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
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
send a GOAWAY frame to indicate what streams it might have acted on.
A client that is unable to retry requests loses all requests that are
in flight when the server closes the connection. A server MAY send
multiple GOAWAY frames indicating different stream IDs, but MUST NOT
increase the value they send in the last Stream ID, since clients
might already have retried unprocessed requests on another
connection. A server that is attempting to gracefully shut down a
connection SHOULD send an initial GOAWAY frame with the last Stream
ID set to the current value of QUIC's MAX_STREAM_ID and SHOULD NOT
increase the MAX_STREAM_ID thereafter. This signals to the client
that a shutdown is imminent and that initiating further requests is
prohibited. After allowing time for any in-flight requests (at least
one round-trip time), the server MAY send another GOAWAY frame with
an updated last Stream ID. This ensures that a connection can be
cleanly shut down without losing requests.
Once all accepted requests have been processed, the server can permit
the connection to become idle, or MAY initiate an immediate closure
of the connection. An endpoint that completes a graceful shutdown
SHOULD use the HTTP_NO_ERROR code when closing the connection.
5.3. Immediate Application Closure
An HTTP/QUIC implementation can immediately close the QUIC connection
at any time. This results in sending a QUIC APPLICATION_CLOSE frame
to the peer; the error code in this frame indicates to the peer why
the connection is being closed. See Section 6 for error codes which
can be used when closing a connection.
Before closing the connection, a GOAWAY MAY be sent to allow the
client to retry some requests. Including the GOAWAY frame in the
same packet as the QUIC APPLICATION_CLOSE frame improves the chances
of the frame being received by clients.
5.4. Transport Closure
For various reasons, the QUIC transport could indicate to the
application layer that the connection has terminated. This might be
due to an explicit closure by the peer, a transport-level error, or a
change in network topology which interrupts connectivity.
If a connection terminates without a GOAWAY frame, clients MUST
assume that any request which was sent, whether in whole or in part,
might have been processed.
6. Error Handling 6. Error Handling
QUIC allows the application to abruptly terminate (reset) individual QUIC allows the application to abruptly terminate (reset) individual
streams or the entire connection when an error is encountered. These streams or the entire connection when an error is encountered. These
are referred to as "stream errors" or "connection errors" and are are referred to as "stream errors" or "connection errors" and are
described in more detail in [QUIC-TRANSPORT]. described in more detail in [QUIC-TRANSPORT].
This section describes HTTP/QUIC-specific error codes which can be This section describes HTTP/QUIC-specific error codes which can be
used to express the cause of a connection or stream error. used to express the cause of a connection or stream error.
skipping to change at page 28, line 27 skipping to change at page 29, line 15
HTTP_INCOMPLETE_REQUEST (0x06): The client's stream terminated HTTP_INCOMPLETE_REQUEST (0x06): The client's stream terminated
without containing a fully-formed request. without containing a fully-formed request.
HTTP_CONNECT_ERROR (0x07): The connection established in response to HTTP_CONNECT_ERROR (0x07): The connection established in response to
a CONNECT request was reset or abnormally closed. a CONNECT request was reset or abnormally closed.
HTTP_EXCESSIVE_LOAD (0x08): The endpoint detected that its peer is HTTP_EXCESSIVE_LOAD (0x08): The endpoint detected that its peer is
exhibiting a behavior that might be generating excessive load. exhibiting a behavior that might be generating excessive load.
HTTP_VERSION_FALLBACK (0x09): The requested operation cannot be HTTP_VERSION_FALLBACK (0x09): The requested operation cannot be
served over HTTP/QUIC. The peer should retry over HTTP/2. served over HTTP/QUIC. The peer should retry over HTTP/1.1.
HTTP_WRONG_STREAM (0x0A): A frame was received on a stream where it HTTP_WRONG_STREAM (0x0A): A frame was received on a stream where it
is not permitted. is not permitted.
HTTP_PUSH_LIMIT_EXCEEDED (0x0B): A Push ID greater than the current HTTP_PUSH_LIMIT_EXCEEDED (0x0B): A Push ID greater than the current
maximum Push ID was referenced. maximum Push ID was referenced.
HTTP_DUPLICATE_PUSH (0x0C): A Push ID was referenced in two HTTP_DUPLICATE_PUSH (0x0C): A Push ID was referenced in two
different stream headers. different stream headers.
skipping to change at page 33, line 34 skipping to change at page 34, line 27
simplicity. See Section 10.4. simplicity. See Section 10.4.
8.4. 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/QUIC error codes as follows:
NO_ERROR (0x0): HTTP_NO_ERROR in Section 6.1. NO_ERROR (0x0): HTTP_NO_ERROR in Section 6.1.
PROTOCOL_ERROR (0x1): No single mapping. See new PROTOCOL_ERROR (0x1): No single mapping. See new
HTTP_MALFORMED_FRAME error codes defined in Section 6.1. HTTP_MALFORMED_FRAME error codes defined in Section 6.1.
INTERNAL_ERROR (0x2): HTTP_INTERNAL_ERROR in Section 6.1. INTERNAL_ERROR (0x2): HTTP_INTERNAL_ERROR in Section 6.1.
FLOW_CONTROL_ERROR (0x3): Not applicable, since QUIC handles flow FLOW_CONTROL_ERROR (0x3): Not applicable, since QUIC handles flow
control. Would provoke a QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA control. Would provoke a QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA
skipping to change at page 34, line 30 skipping to change at page 35, line 23
INADEQUATE_SECURITY (0xc): Not applicable, since QUIC is assumed to INADEQUATE_SECURITY (0xc): Not applicable, since QUIC is assumed to
provide sufficient security on all connections. provide sufficient security on all connections.
HTTP_1_1_REQUIRED (0xd): HTTP_VERSION_FALLBACK in Section 6.1. HTTP_1_1_REQUIRED (0xd): HTTP_VERSION_FALLBACK in Section 6.1.
Error codes need to be defined for HTTP/2 and HTTP/QUIC separately. Error codes need to be defined for HTTP/2 and HTTP/QUIC separately.
See Section 10.5. See Section 10.5.
9. Security Considerations 9. Security Considerations
The security considerations of HTTP over QUIC should be comparable to The security considerations of HTTP/QUIC should be comparable to
those of HTTP/2 with TLS. Note that where HTTP/2 employs PADDING those of HTTP/2 with TLS. Note that where HTTP/2 employs PADDING
frames to make a connection more resistant to traffic analysis, HTTP/ frames to make a connection more resistant to traffic analysis, HTTP/
QUIC can rely on QUIC's own PADDING frames or employ the reserved QUIC can rely on QUIC's own PADDING frames or employ the reserved
frame and stream types discussed in Section 4.2.1 and Section 3.3.1. frame and stream types discussed in Section 4.2.1 and Section 3.3.1.
When HTTP Alternative Services is used for discovery for HTTP/QUIC
endpoints, the security considerations of [ALTSVC] also apply.
The modified SETTINGS format contains nested length elements, which The modified SETTINGS format contains nested length elements, which
could pose a security risk to an incautious implementer. A SETTINGS could pose a security risk to an incautious implementer. A SETTINGS
frame parser MUST ensure that the length of the frame exactly matches frame parser MUST ensure that the length of the frame exactly matches
the length of the settings it contains. the length of the settings it contains.
10. IANA Considerations 10. IANA Considerations
10.1. Registration of HTTP/QUIC Identification String 10.1. Registration of HTTP/QUIC Identification String
This document creates a new registration for the identification of This document creates a new registration for the identification of
HTTP/QUIC in the "Application Layer Protocol Negotiation (ALPN) HTTP/QUIC in the "Application Layer Protocol Negotiation (ALPN)
Protocol IDs" registry established in [RFC7301]. Protocol IDs" registry established in [RFC7301].
The "hq" string identifies HTTP/QUIC: The "hq" string identifies HTTP/QUIC:
Protocol: HTTP over QUIC Protocol: HTTP/QUIC
Identification Sequence: 0x68 0x71 ("hq") Identification Sequence: 0x68 0x71 ("hq")
Specification: This document Specification: This document
10.2. Registration of QUIC Version Hint Alt-Svc Parameter 10.2. Registration of QUIC Version Hint Alt-Svc Parameter
This document creates a new registration for version-negotiation This document creates a new registration for version-negotiation
hints in the "Hypertext Transfer Protocol (HTTP) Alt-Svc Parameter" hints in the "Hypertext Transfer Protocol (HTTP) Alt-Svc Parameter"
registry established in [RFC7838]. registry established in [RFC7838].
skipping to change at page 39, line 11 skipping to change at page 40, line 11
| | 7 | error on | | | | 7 | error on | |
| | | CONNECT | | | | | CONNECT | |
| | | request | | | | | request | |
| | | | | | | | | |
| HTTP_EXCESSIVE_LOAD | 0x000 | Peer | Section 6.1 | | HTTP_EXCESSIVE_LOAD | 0x000 | Peer | Section 6.1 |
| | 8 | generating | | | | 8 | generating | |
| | | excessive | | | | | excessive | |
| | | load | | | | | load | |
| | | | | | | | | |
| HTTP_VERSION_FALLBACK | 0x000 | Retry over | Section 6.1 | | HTTP_VERSION_FALLBACK | 0x000 | Retry over | Section 6.1 |
| | 9 | HTTP/2 | | | | 9 | HTTP/1.1 | |
| | | | | | | | | |
| HTTP_WRONG_STREAM | 0x000 | A frame was | Section 6.1 | | HTTP_WRONG_STREAM | 0x000 | A frame was | Section 6.1 |
| | A | sent on the | | | | A | sent on the | |
| | | wrong stream | | | | | wrong stream | |
| | | | | | | | | |
| HTTP_PUSH_LIMIT_EXCEEDE | 0x000 | Maximum Push | Section 6.1 | | HTTP_PUSH_LIMIT_EXCEEDE | 0x000 | Maximum Push | Section 6.1 |
| D | B | ID exceeded | | | D | B | ID exceeded | |
| | | | | | | | | |
| HTTP_DUPLICATE_PUSH | 0x000 | Push ID was | Section 6.1 | | HTTP_DUPLICATE_PUSH | 0x000 | Push ID was | Section 6.1 |
| | C | fulfilled | | | | C | fulfilled | |
skipping to change at page 41, line 6 skipping to change at page 42, line 6
Stream Type: Reserved - GREASE Stream Type: Reserved - GREASE
Specification: Section 3.3.1 Specification: Section 3.3.1
Sender: Both Sender: Both
11. References 11. References
11.1. Normative References 11.1. Normative References
[ALTSVC] Nottingham, M., McManus, P., and J. Reschke, "HTTP
Alternative Services", RFC 7838, DOI 10.17487/RFC7838,
April 2016, <https://www.rfc-editor.org/info/rfc7838>.
[QPACK] Krasic, C., Bishop, M., and A. Frindell, Ed., "QPACK: [QPACK] Krasic, C., Bishop, M., and A. Frindell, Ed., "QPACK:
Header Compression for HTTP over QUIC", draft-ietf-quic- Header Compression for HTTP over QUIC", draft-ietf-quic-
qpack-02 (work in progress). qpack-latest (work in progress).
[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-14 (work in progress). transport-latest (work in progress).
[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>.
 End of changes. 45 change blocks. 
174 lines changed or deleted 214 lines changed or added

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