@@ -12,11 +12,11 @@ stand_alone: yes
12
12
pi : [toc, sortrefs, symrefs, docmapping]
13
13
14
14
author :
15
- -
15
+ -
16
16
ins : M. Bishop
17
17
name : Mike Bishop
18
- org : Microsoft
19
- email : Michael.Bishop@microsoft.com
18
+ org : Akamai
19
+ email : mbishop@evequefou.be
20
20
role : editor
21
21
22
22
normative :
@@ -85,6 +85,9 @@ defined in {{!RFC2119}}.
85
85
Field definitions are given in Augmented Backus-Naur Form (ABNF), as defined in
86
86
{{!RFC5234}}.
87
87
88
+ This document uses the variable-length integer encoding from
89
+ {{QUIC-TRANSPORT}}.
90
+
88
91
89
92
# QUIC Advertisement
90
93
@@ -355,21 +358,21 @@ allows a server to fulfill promises in the order that best suits its needs.
355
358
The server push response is conveyed on a push stream. A push stream is a
356
359
server-initiated stream. A push stream includes a header (see
357
360
{{fig-push-stream-header}}) that identifies the PUSH_PROMISE that it fulfills.
358
- This header consists of a 32-bit Push ID, which identifies a server push (see
359
- {{frame-push-promise}}).
361
+ This header consists of a Push ID, encoded as a variable-length integer. The
362
+ Push ID identifies a server push (see {{frame-push-promise}}).
360
363
361
364
~~~~~
362
365
0 1 2 3
363
366
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
364
367
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
365
- | Push ID (32) |
368
+ | Push ID (i) |
366
369
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
367
370
~~~~~
368
371
{: # fig-push-stream-header title="Push Stream Header"}
369
372
370
- A push stream always starts with a 32-bit Push ID. A client MUST treat
371
- receiving a push stream that contains fewer than 4 octets as a connection error
372
- of type HTTP_MALFORMED_PUSH.
373
+ A push stream always starts with a Push ID. A client MUST treat receiving a
374
+ push stream that contains a truncated variable-length integer as a connection
375
+ error of type HTTP_MALFORMED_PUSH.
373
376
374
377
A server SHOULD use Push IDs sequentially, starting at 0. A client uses the
375
378
MAX_PUSH_ID frame ({{frame-max-push-id}}) to limit the number of pushes that a
@@ -408,13 +411,30 @@ All frames have the following format:
408
411
0 1 2 3
409
412
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
410
413
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
411
- | Length (16 ) | Type (8) | Flags (8) |
414
+ | Length (i ) ...
412
415
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
413
- | Frame Payload (*) ...
416
+ | Type (8) | Flags (8) | Frame Payload (*) ...
414
417
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
415
418
~~~~~~~~~~
416
419
{: # fig-frame title="HTTP/QUIC frame format"}
417
420
421
+ A frame includes the following fields :
422
+
423
+ Length :
424
+ : A variable-length integer that describes the length of the Frame Payload.
425
+ This length does not include the frame header.
426
+
427
+ Type :
428
+ : An 8-bit type for the frame.
429
+
430
+ Flags :
431
+ : An 8-bit field containing flags. The Type field determines the semantics of
432
+ flags.
433
+
434
+ Frame Payload :
435
+ : A payload, the semantics of which are determined by the Type field.
436
+
437
+
418
438
# # Frame Definitions {#frames}
419
439
420
440
# ## DATA {#frame-data}
@@ -434,25 +454,13 @@ with a payload length of zero, the recipient MUST respond with a stream error
434
454
435
455
# ## HEADERS {#frame-headers}
436
456
437
- The HEADERS frame (type=0x1) is used to carry part of a header set, compressed
438
- using HPACK {{header-compression}}.
439
-
440
- One flag is defined :
441
-
442
- End Header Block (0x4) :
443
- : This frame concludes a header block.
457
+ The HEADERS frame (type=0x1) is used to carry a header block, compressed using
458
+ HPACK {{header-compression}}.
444
459
445
- A HEADERS frame with any other flags set MUST be treated as a connection error
446
- of type HTTP_MALFORMED_HEADERS.
460
+ No flags are defined for the HEADERS frame.
447
461
448
- The next frame on the same stream after a HEADERS frame without the EHB flag set
449
- MUST be another HEADERS frame. A receiver MUST treat the receipt of any other
450
- type of frame as a stream error of type HTTP_INTERRUPTED_HEADERS. (Note that
451
- QUIC can intersperse data from other streams between frames, or even during
452
- transmission of frames, so multiplexing is not blocked by this requirement.)
453
-
454
- A full header block is contained in a sequence of zero or more HEADERS frames
455
- without EHB set, followed by a HEADERS frame with EHB set.
462
+ A HEADERS frame with any flags set MUST be treated as a connection error of type
463
+ HTTP_MALFORMED_HEADERS.
456
464
457
465
458
466
# ## PRIORITY {#frame-priority}
@@ -485,9 +493,9 @@ The flags defined are:
485
493
0 1 2 3
486
494
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
487
495
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
488
- | Prioritized Request ID (32) |
496
+ | Prioritized Request ID (i) |
489
497
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
490
- | Stream Dependency ID (32) |
498
+ | Stream Dependency ID (i) |
491
499
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
492
500
| Weight (8) |
493
501
+-+-+-+-+-+-+-+-+
@@ -497,24 +505,24 @@ The flags defined are:
497
505
The PRIORITY frame payload has the following fields :
498
506
499
507
Prioritized Request ID :
500
- : A 32-bit identifier for a request. This contains the stream ID of a request
501
- stream when the PUSH_PRIORITIZED flag is clear, or a Push ID when the
502
- PUSH_PRIORITIZED flag is set.
508
+ : A variable-length integer that identifies a request. This contains
509
+ the Stream ID of a request stream when the PUSH_PRIORITIZED flag is clear,
510
+ or a Push ID when the PUSH_PRIORITIZED flag is set.
503
511
504
512
Stream Dependency ID :
505
- : A 32-bit stream identifier for a dependent request. This contains the
506
- stream ID of a request stream when the PUSH_DEPENDENT flag is clear, or a
507
- Push ID when the PUSH_DEPENDENT flag is set. A request stream ID of 0
508
- indicates a dependency on the root stream. For details of dependencies,
509
- see {{priority}} and {{!RFC7540}}, Section 5.3.
513
+ : A variable-length integer that identifies a dependent request. This
514
+ contains the Stream ID of a request stream when the PUSH_DEPENDENT flag is
515
+ clear, or a Push ID when the PUSH_DEPENDENT flag is set. A request Stream
516
+ ID of 0 indicates a dependency on the root stream. For details of
517
+ dependencies, see {{priority}} and {{!RFC7540}}, Section 5.3.
510
518
511
519
Weight :
512
520
: An unsigned 8-bit integer representing a priority weight for the stream (see
513
521
{{!RFC7540}}, Section 5.3). Add one to the value to obtain a weight between
514
522
1 and 256.
515
523
516
- A PRIORITY frame identifies a request to priotize , and a request upon which that
517
- request is dependent. A Prioritized Request ID or Stream Dependency ID
524
+ A PRIORITY frame identifies a request to prioritize , and a request upon which
525
+ that request is dependent. A Prioritized Request ID or Stream Dependency ID
518
526
identifies a client-initiated request using the corresponding stream ID when the
519
527
corresponding PUSH_PRIORITIZED or PUSH_DEPENDENT flag is not set. Setting the
520
528
PUSH_PRIORITIZED or PUSH_DEPENDENT flag causes the Prioritized Request ID or
@@ -534,15 +542,18 @@ HTTP_MALFORMED_PRIORITY error, unless it references stream ID 0. A PRIORITY
534
542
that sets a PUSH_PRIORITIZED or PUSH_DEPENDENT flag, but then references a
535
543
non-existent Push ID MUST be treated as a HTTP_MALFORMED_PRIORITY error.
536
544
537
- The length of a PRIORITY frame is 9 octets. A PRIORITY frame with any other
538
- length MUST be treated as a connection error of type HTTP_MALFORMED_PRIORITY.
545
+ A PRIORITY frame MUST contain only the identified fields. A PRIORITY frame that
546
+ contains more or fewer fields, or a PRIORITY frame that includes a truncated
547
+ integer encoding MUST be treated as a connection error of type
548
+ HTTP_MALFORMED_PRIORITY.
539
549
540
550
541
551
# ## CANCEL_PUSH {#frame-cancel-push}
542
552
543
553
The CANCEL_PUSH frame (type=0x3) is used to request cancellation of server push
544
554
prior to the push stream being created. The CANCEL_PUSH frame identifies a
545
- server push request by Push ID (see {{frame-push-promise}}).
555
+ server push request by Push ID (see {{frame-push-promise}}) using a
556
+ variable-length integer.
546
557
547
558
When a server receives this frame, it aborts sending the response for the
548
559
identified server push. If the server has not yet started to send the server
@@ -563,14 +574,16 @@ type HTTP_WRONG_STREAM.
563
574
564
575
The CANCEL_PUSH frame has no defined flags.
565
576
566
- The CANCEL_PUSH frame carries a 32-bit Push ID that identifies the server push
567
- that is being cancelled (see {{frame-push-promise}}).
577
+ The CANCEL_PUSH frame carries a Push ID encoded as a variable-length integer.
578
+ The Push ID identifies the server push that is being cancelled (see
579
+ {{frame-push-promise}}).
568
580
569
581
If the client receives a CANCEL_PUSH frame, that frame might identify a Push ID
570
582
that has not yet been mentioned by a PUSH_PROMISE frame.
571
583
572
- A server MUST treat a CANCEL_PUSH frame payload that is other than 4 octets in
573
- length as a connection error of type HTTP_MALFORMED_CANCEL_PUSH.
584
+ A server MUST treat a CANCEL_PUSH frame payload does not contain exactly one
585
+ variable-length integer as a connection error of type
586
+ HTTP_MALFORMED_CANCEL_PUSH.
574
587
575
588
576
589
# ## SETTINGS {#frame-settings}
@@ -605,7 +618,7 @@ value.
605
618
0 1 2 3
606
619
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
607
620
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
608
- | Identifier (16) | Length (16 ) |
621
+ | Identifier (16) | Length (i ) ...
609
622
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
610
623
| Contents (?) ...
611
624
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -638,20 +651,17 @@ HTTP_MALFORMED_SETTINGS.
638
651
639
652
# ### Integer encoding
640
653
641
- Settings which are integers are transmitted in network byte order. Leading
642
- zero octets are permitted, but implementations SHOULD use only as many bytes as
643
- are needed to represent the value. An integer MUST NOT be represented in more
644
- bytes than would be used to transfer the maximum permitted value.
654
+ Settings which are integers use the QUIC variable-length integer encoding.
645
655
646
656
# ### Defined SETTINGS Parameters {#settings-parameters}
647
657
648
658
The following settings are defined in HTTP/QUIC :
649
659
650
660
SETTINGS_HEADER_TABLE_SIZE (0x1) :
651
- : An integer with a maximum value of 2^32 - 1. This value MUST be zero.
661
+ : An integer with a maximum value of 2^30 - 1. This value MUST be zero.
652
662
653
663
SETTINGS_MAX_HEADER_LIST_SIZE (0x6) :
654
- : An integer with a maximum value of 2^32 - 1
664
+ : An integer with a maximum value of 2^30 - 1
655
665
656
666
# ### Usage in 0-RTT
657
667
@@ -691,7 +701,7 @@ server to client, as in HTTP/2. The PUSH_PROMISE frame defines no flags.
691
701
0 1 2 3
692
702
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
693
703
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
694
- | Push ID (32 ) |
704
+ | Push ID (i ) ...
695
705
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
696
706
| Header Block (*) ...
697
707
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -701,9 +711,9 @@ server to client, as in HTTP/2. The PUSH_PROMISE frame defines no flags.
701
711
The payload consists of :
702
712
703
713
Push ID :
704
- : A 32-bit identifier for the server push request. A push ID is used in push
705
- stream header ({{server-push}}), CANCEL_PUSH frames ({{frame-cancel-push}}),
706
- and PRIORITY frames ({{frame-priority}}).
714
+ : A variable-length integer that identifies the server push request. A push ID
715
+ is used in push stream header ({{server-push}}), CANCEL_PUSH frames
716
+ ({{frame-cancel-push}}), and PRIORITY frames ({{frame-priority}}).
707
717
708
718
Header Block :
709
719
: HPACK-compressed request headers for the promised response.
@@ -742,10 +752,12 @@ while still finishing processing of previously received requests. This enables
742
752
administrative actions, like server maintenance. GOAWAY by itself does not
743
753
close a connection.
744
754
745
- The GOAWAY frame does not define any flags, and the payload is a QUIC stream
746
- identifier. The GOAWAY frame applies to the connection, not a specific stream.
747
- A client MUST treat a GOAWAY frame on a stream other than the control stream
748
- as a connection error ({{errors}}) of type HTTP_WRONG_STREAM.
755
+ The GOAWAY frame does not define any flags, and the payload is a QUIC Stream ID
756
+ encoded as a variable-length integer.
757
+
758
+ The GOAWAY frame applies to the connection, not a specific stream. A client
759
+ MUST treat a GOAWAY frame on a stream other than the control stream as a
760
+ connection error ({{errors}}) of type HTTP_WRONG_STREAM.
749
761
750
762
Clients do not need to send GOAWAY to initiate a graceful shutdown; they simply
751
763
stop making new requests. A server MUST treat receipt of a GOAWAY frame as a
@@ -856,14 +868,15 @@ sending a MAX_PUSH_ID frame as the server fulfills or cancels server pushes.
856
868
857
869
The MAX_PUSH_ID frame has no defined flags.
858
870
859
- The MAX_PUSH_ID frame carries a 32-bit Push ID that identifies the maximum value
860
- for a Push ID that the server can use (see {{frame-push-promise}}). A
861
- MAX_PUSH_ID frame cannot reduce the maximum Push ID; receipt of a MAX_PUSH_ID
862
- that contains a smaller value than previously received MUST be treated as a
863
- connection error of type HTTP_MALFORMED_MAX_PUSH_ID.
871
+ The MAX_PUSH_ID frame carries a single variable-length integer that identifies
872
+ the maximum value for a Push ID that the server can use (see
873
+ {{frame-push-promise}}). A MAX_PUSH_ID frame cannot reduce the maximum Push ID;
874
+ receipt of a MAX_PUSH_ID that contains a smaller value than previously received
875
+ MUST be treated as a connection error of type HTTP_MALFORMED_MAX_PUSH_ID.
864
876
865
- A server MUST treat a MAX_PUSH_ID frame payload that is other than 4 octets in
866
- length as a connection error of type HTTP_MALFORMED_MAX_PUSH_ID.
877
+ A server MUST treat a MAX_PUSH_ID frame payload that does not contain a single
878
+ variable-length integer as a connection error of type
879
+ HTTP_MALFORMED_MAX_PUSH_ID.
867
880
868
881
869
882
# Connection Management
@@ -984,6 +997,13 @@ applicable to both protocols at once.
984
997
985
998
These departures are noted in this section.
986
999
1000
+ # # Streams {#h2-streams}
1001
+
1002
+ HTTP/QUIC permits use of a larger number of streams (2^62-1) then HTTP/2. The
1003
+ considerations about exhaustion of stream identifier space apply, though the
1004
+ space is significantly larger such that it is likely that other limits in QUIC
1005
+ are reached first, such as the limit on the connection flow control window.
1006
+
987
1007
# # HTTP Frame Types {#h2-frames}
988
1008
989
1009
Many framing concepts from HTTP/2 can be elided away on QUIC, because the
@@ -1017,7 +1037,13 @@ HEADERS frames. To achieve in-order delivery of priority changes in HTTP/QUIC,
1017
1037
PRIORITY frames are sent on the control stream and the PRIORITY section is
1018
1038
removed from the HEADERS frame.
1019
1039
1020
- Other than this issue, frame type HTTP/2 extensions are typically portable to
1040
+ Frame type definitions in HTTP/QUIC often use the QUIC variable-length integer
1041
+ encoding. In particular, Stream IDs use this encoding, which allow for a larger
1042
+ range of possible values than the encoding used in HTTP/2. Redefinition of the
1043
+ encoding of extension frame types might be necessary if the encoding includes a
1044
+ Stream ID.
1045
+
1046
+ Other than these issues, frame type HTTP/2 extensions are typically portable to
1021
1047
QUIC simply by replacing Stream 0 in HTTP/2 with Stream 1 in HTTP/QUIC.
1022
1048
HTTP/QUIC extensions will not assume ordering, but would not be harmed by
1023
1049
ordering, and would be portable to HTTP/2 in the same manner.
@@ -1354,14 +1380,21 @@ The entries in the following table are registered by this document.
1354
1380
1355
1381
The original authors of this specification were Robbie Shade and Mike Warres.
1356
1382
1383
+ A substantial portion of Mike's contribution was supported by Microsoft during
1384
+ his employment there.
1385
+
1357
1386
# Change Log
1358
1387
1359
1388
> **RFC Editor's Note:** Please remove this section prior to publication of a
1360
1389
> final version of this document.
1361
1390
1391
+ # # Since draft-ietf-quic-http-07
1392
+
1393
+ - Changes for integer encodings in QUIC (#595,#905)
1394
+
1362
1395
# # Since draft-ietf-quic-http-06
1363
1396
1364
- Nothing yet.
1397
+ - Track changes in QUIC error code usage (#485)
1365
1398
1366
1399
# # Since draft-ietf-quic-http-05
1367
1400
0 commit comments