From 336c85c1817fcb9bc6bc81291cc475c4b46bedfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20B=C3=A9ky?= Date: Wed, 29 Apr 2020 13:59:31 -0400 Subject: [PATCH] Clarify reserved values. Clarify reserved values for stream types, settings identifiers, frame types, and error codes. 0x1f * N + 0x21 for the value of N = -1 is 0x02. Literal interpretation of the current text includes this as a reserved value. The parenthetical examples given in Section 11.2 make it clear that this was not the intention, rendering this PR editorial. The main motivation of this PR is not that the current text is inconsistent, but that parenthetical examples from 11.2 are necessary to correctly interpret the definitions in sections 6.2.3, 7.2.4.1, 7.2.8, and 8.1. Alternative wordings could be: "0x1f * N + 0x21 for N = 0, 1, 2, ..." "0x1f * N + 0x02 for positive integer values of N" "0x1f * N + 0x02 for N = 1, 2, 3, ..." "0x21, 0x21 + 0x1f, 0x21 + 2 * 0x1f, ..." "a value of at least 0x21 with a remainder of 0x02 modulo 0x1f" "a value of at least 0x21 that is congruent to 0x21 modulo 0x1f" none of which is better than what this PR proposes. --- draft-ietf-quic-http.md | 59 +++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/draft-ietf-quic-http.md b/draft-ietf-quic-http.md index 70dc549c77..405c521c23 100644 --- a/draft-ietf-quic-http.md +++ b/draft-ietf-quic-http.md @@ -1165,8 +1165,8 @@ client MUST treat this as a connection error of type H3_ID_ERROR. ### Reserved Stream Types {#stream-grease} -Stream types of the format `0x1f * N + 0x21` for integer values of N are -reserved to exercise the requirement that unknown types be ignored. These +Stream types of the format `0x1f * N + 0x21` for non-negative integer values of +N are reserved to exercise the requirement that unknown types be ignored. These streams have no semantics, and can be sent when application-layer padding is desired. They MAY also be sent on connections where no data is currently being transferred. Endpoints MUST NOT consider these streams to have any meaning upon @@ -1390,11 +1390,11 @@ The following settings are defined in HTTP/3: SETTINGS_MAX_FIELD_SECTION_SIZE (0x6): : The default value is unlimited. See {{header-formatting}} for usage. -Setting identifiers of the format `0x1f * N + 0x21` for integer values of N are -reserved to exercise the requirement that unknown identifiers be ignored. Such -settings have no defined meaning. Endpoints SHOULD include at least one such -setting in their SETTINGS frame. Endpoints MUST NOT consider such settings to -have any meaning upon receipt. +Setting identifiers of the format `0x1f * N + 0x21` for non-negative integer +values of N are reserved to exercise the requirement that unknown identifiers be +ignored. Such settings have no defined meaning. Endpoints SHOULD include at +least one such setting in their SETTINGS frame. Endpoints MUST NOT consider such +settings to have any meaning upon receipt. Because the setting has no defined meaning, the value of the setting can be any value the implementation selects. @@ -1581,12 +1581,12 @@ MUST be treated as a connection error of type H3_ID_ERROR. ### Reserved Frame Types {#frame-reserved} -Frame types of the format `0x1f * N + 0x21` for integer values of N are reserved -to exercise the requirement that unknown types be ignored ({{extensions}}). -These frames have no semantics, and can be sent on any open stream when -application-layer padding is desired. They MAY also be sent on connections where -no data is currently being transferred. Endpoints MUST NOT consider these frames -to have any meaning upon receipt. +Frame types of the format `0x1f * N + 0x21` for non-negative integer values of N +are reserved to exercise the requirement that unknown types be ignored +({{extensions}}). These frames have no semantics, and can be sent on any open +stream when application-layer padding is desired. They MAY also be sent on +connections where no data is currently being transferred. Endpoints MUST NOT +consider these frames to have any meaning upon receipt. The payload and length of the frames are selected in any manner the implementation chooses. @@ -1676,10 +1676,11 @@ H3_VERSION_FALLBACK (0x110): : The requested operation cannot be served over HTTP/3. The peer should retry over HTTP/1.1. -Error codes of the format `0x1f * N + 0x21` for integer values of N are reserved -to exercise the requirement that unknown error codes be treated as equivalent to -H3_NO_ERROR ({{extensions}}). Implementations SHOULD select an error code from -this space with some probability when they would have sent H3_NO_ERROR. +Error codes of the format `0x1f * N + 0x21` for non-negative integer values of N +are reserved to exercise the requirement that unknown error codes be treated as +equivalent to H3_NO_ERROR ({{extensions}}). Implementations SHOULD select an +error code from this space with some probability when they would have sent +H3_NO_ERROR. # Extensions to HTTP/3 {#extensions} @@ -2011,9 +2012,9 @@ The entries in {{iana-frame-table}} are registered by this document. | ---------------- | ------ | -------------------------- | {: #iana-frame-table title="Initial HTTP/3 Frame Types"} -Additionally, each code of the format `0x1f * N + 0x21` for integer values of N -(that is, `0x21`, `0x40`, ..., through `0x3FFFFFFFFFFFFFFE`) MUST NOT be -assigned by IANA. +Additionally, each code of the format `0x1f * N + 0x21` for non-negative integer +values of N (that is, `0x21`, `0x40`, ..., through `0x3FFFFFFFFFFFFFFE`) MUST +NOT be assigned by IANA. ### Settings Parameters {#iana-settings} @@ -2053,9 +2054,9 @@ The entries in {{iana-setting-table}} are registered by this document. | ---------------------------- | ------ | ------------------------- | --------- | {: #iana-setting-table title="Initial HTTP/3 Settings"} -Additionally, each code of the format `0x1f * N + 0x21` for integer values of N -(that is, `0x21`, `0x40`, ..., through `0x3FFFFFFFFFFFFFFE`) MUST NOT be -assigned by IANA. +Additionally, each code of the format `0x1f * N + 0x21` for non-negative integer +values of N (that is, `0x21`, `0x40`, ..., through `0x3FFFFFFFFFFFFFFE`) MUST +NOT be assigned by IANA. ### Error Codes {#iana-error-codes} @@ -2105,9 +2106,9 @@ The entries in the {{iana-error-table}} are registered by this document. | --------------------------------- | ---------- | ---------------------------------------- | ---------------------- | {: #iana-error-table title="Initial HTTP/3 Error Codes"} -Additionally, each code of the format `0x1f * N + 0x21` for integer values of N -(that is, `0x21`, `0x40`, ..., through `0x3FFFFFFFFFFFFFFE`) MUST NOT be -assigned by IANA. +Additionally, each code of the format `0x1f * N + 0x21` for non-negative integer +values of N (that is, `0x21`, `0x40`, ..., through `0x3FFFFFFFFFFFFFFE`) MUST +NOT be assigned by IANA. ### Stream Types {#iana-stream-types} @@ -2141,9 +2142,9 @@ The entries in the following table are registered by this document. | Push Stream | 0x01 | {{server-push}} | Server | | ---------------- | ------ | -------------------------- | ------ | -Additionally, each code of the format `0x1f * N + 0x21` for integer values of N -(that is, `0x21`, `0x40`, ..., through `0x3FFFFFFFFFFFFFFE`) MUST NOT be -assigned by IANA. +Additionally, each code of the format `0x1f * N + 0x21` for non-negative integer +values of N (that is, `0x21`, `0x40`, ..., through `0x3FFFFFFFFFFFFFFE`) MUST +NOT be assigned by IANA. --- back