@@ -157,6 +157,11 @@ additional framing. Note that a request or response without a body will cause
157
157
this stream to be half-closed in the corresponding direction without
158
158
transferring data.
159
159
160
+ Pairs of streams must be utilized sequentially, with no gaps. The data stream
161
+ MUST be reserved with the QUIC implementation when the message control stream
162
+ is opened or reserved, and MUST be closed after transferring the body, or else
163
+ closed immediately after sending the request headers if there is no body.
164
+
160
165
HTTP does not need to do any separate multiplexing when using QUIC - data sent
161
166
over a QUIC stream always maps to a particular HTTP transaction. Requests and
162
167
responses are considered complete when the corresponding QUIC streams are closed
@@ -177,18 +182,19 @@ HTTP response on the same streams as the request.
177
182
An HTTP message (request or response) consists of :
178
183
179
184
1. for a response only, zero or more header blocks (a sequence of HEADERS frames
180
- with End Header Block set on the last) on the control stream containing the
181
- message headers of informational (1xx) HTTP responses (see {{!RFC7230}}, Section
182
- 3.2 and {{!RFC7231}}, Section 6.2),
185
+ with End Header Block set on the last) on the control stream containing the
186
+ message headers of informational (1xx) HTTP responses (see {{!RFC7230}},
187
+ Section 3.2 and {{!RFC7231}}, Section 6.2),
183
188
184
189
2. one header block on the control stream containing the message headers (see
185
- {{!RFC7230}}, Section 3.2),
190
+ {{!RFC7230}}, Section 3.2),
186
191
187
- 3. the payload body (see {{!RFC7230}}, Section 3.3), sent on the data stream
192
+ 3. the payload body (see {{!RFC7230}}, Section 3.3), sent on the data stream,
188
193
189
194
4. optionally, one header block on the control stream containing the
190
- trailer-part, if present (see {{!RFC7230}}, Section 4.1.2).
195
+ trailer-part, if present (see {{!RFC7230}}, Section 4.1.2).
191
196
197
+ The data stream MUST be half-closed immediately after the transfer of the body.
192
198
If the message does not contain a body, the corresponding data stream MUST still
193
199
be half-closed without transferring any data. The "chunked" transfer encoding
194
200
defined in Section 4.1 of {{!RFC7230}} MUST NOT be used.
@@ -549,20 +555,38 @@ SETTINGS frame MUST be processed in the order they appear, with no other frame
549
555
processing between values. Unsupported parameters MUST be ignored.
550
556
551
557
Once all values have been processed, if the REQUEST_ACK flag was set, the
552
- recipient MUST immediately emit a SETTINGS_ACK frame listing the identifiers
553
- whose values were understood and applied. (If none of the values were
554
- understood, the SETTINGS_ACK frame will be empty, but MUST still be sent.) Upon
555
- receiving an SETTINGS_ACK frame, the sender of the altered parameters can rely
556
- on the setting having been applied.
557
-
558
- TODO :
559
- : The above text was written for HTTP/2 -- QUIC has cross-stream timing issues
560
- here that need to be solved.
561
-
558
+ recipient MUST immediately emit the following :
559
+
560
+ - On the connection control stream, a SETTINGS_ACK frame listing the
561
+ identifiers whose values were understood and applied. (If none of the values
562
+ were understood, the SETTINGS_ACK frame will be empty, but MUST still be
563
+ sent.)
564
+
565
+ - On each request control stream which is not in the "half-closed (local)" or
566
+ " closed" state, an empty SETTINGS_ACK frame.
567
+
568
+ The SETTINGS_ACK frame on the connection control stream contains the highest
569
+ stream number which was open at the time the SETTINGS frame was received. All
570
+ streams with higher numbers can safely be assumed to have the new settings in
571
+ effect when they open.
572
+
573
+ For already-open streams, the empty SETTINGS_ACK frame indicates the point at
574
+ which the new settings took effect, if they did so before the peer half-closed
575
+ the stream. If the peer closed the stream before receiving the SETTINGS frame,
576
+ the previous settings were in effect for the full lifetime of that stream.
577
+
578
+ In certain conditions, the SETTINGS_ACK frame can be the first frame on a given
579
+ stream -- this simply indicates that the new settings apply from the beginning
580
+ of that stream.
581
+
562
582
If the sender of a SETTINGS frame with the REQUEST_ACK flag set does not
563
- receive an acknowledgement within a reasonable amount of time, it MAY issue a
564
- connection error ([RFC7540] Section 5.4.1) of type SETTINGS_TIMEOUT.
565
-
583
+ receive full acknowledgement within a reasonable amount of time, it MAY issue a
584
+ connection error ([RFC7540] Section 5.4.1) of type SETTINGS_TIMEOUT. A full
585
+ acknowledgement has occurred when a SETTINGS_ACK frame has been received on the
586
+ connection control stream, and all message control streams with a Stream ID
587
+ through those given in the SETTINGS_ACK frame have either closed or had a
588
+ SETTINGS_ACK frame sent.
589
+
566
590
567
591
# ## PUSH_PROMISE {#frame-push-promise}
568
592
@@ -626,13 +650,39 @@ frames provide equivalent functionality. Frame type 0x9 is reserved.
626
650
# ## SETTINGS_ACK Frame {#frame-settings-ack}
627
651
628
652
The SETTINGS_ACK frame (id = 0x0b) acknowledges receipt and application
629
- of specific values in the peer's SETTINGS frame. It contains a list of
630
- SETTINGS identifiers which the sender has understood and applied. This
631
- list MAY be empty.
653
+ of specific values in the peer's SETTINGS frame. Depending on the stream where
654
+ it is sent, it takes two different forms.
655
+
656
+ On the connection control stream, it contains information about how and when the
657
+ sender has processed the most recently-received SETTINGS frame, and has the
658
+ following payload :
659
+
660
+ ~~~~~~~~~~~~~~~
661
+ 0 1 2 3
662
+ 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
663
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
664
+ | Highest Local Stream (32) |
665
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
666
+ | Highest Remote Stream (32) |
667
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
668
+ | Unrecognized Identifiers (*) ...
669
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
670
+ ~~~~~~~~~~~~~~~
671
+ {: # fig-settings-ack title="SETTINGS_ACK connection control stream format"}
672
+
673
+ Highest Local Stream (32 bits) :
674
+ : The highest locally-initiated Stream ID which is not in the "idle" state
675
+
676
+ Highest Remote Stream (32 bits) :
677
+ : The highest peer-initiated Stream ID which is not in the "idle" state
678
+
679
+ Unrecognized Identifiers :
680
+ : A list of 16-bit SETTINGS identifiers which the sender has not understood
681
+ and therefore ignored. This list MAY be empty.
632
682
633
- Any SETTINGS_ACK frame whose length is not a multiple of two bytes MUST
634
- be treated as a connection error ({{errors}}) of type
635
- ` FRAME_SIZE_ERROR ` .
683
+ On message control streams, the SETTINGS_ACK frame carries no payload, and is
684
+ strictly a synchronization marker for settings application. See
685
+ {{settings-synchronization}} for more detail .
636
686
637
687
# Error Handling {#errors}
638
688
0 commit comments