Skip to content

Commit

Permalink
Refactor Push ID related errors (#2820)
Browse files Browse the repository at this point in the history
* Refactor Push ID related errors

* Replace HTTP_LIMIT_EXCEEDED with HTTP_ID_ERROR

* Apply suggestions from code review

Co-Authored-By: Mike Bishop <mbishop@evequefou.be>
  • Loading branch information
LPardue and MikeBishop committed Jun 27, 2019
1 parent 9a358f2 commit 4d2900c
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions draft-ietf-quic-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ receives a MAX_PUSH_ID frame. A client sends additional MAX_PUSH_ID frames to
control the number of pushes that a server can promise. A server SHOULD use Push
IDs sequentially, starting at 0. A client MUST treat receipt of a push stream
with a Push ID that is greater than the maximum Push ID as a connection error of
type HTTP_LIMIT_EXCEEDED.
type HTTP_ID_ERROR.

The header of the request message is carried by a PUSH_PROMISE frame (see
{{frame-push-promise}}) on the request stream which generated the push. This
Expand Down Expand Up @@ -1046,7 +1046,7 @@ MUST be treated as a connection error of type HTTP_WRONG_STREAM_DIRECTION.

Each Push ID MUST only be used once in a push stream header. If a push stream
header includes a Push ID that was used in another push stream header, the
client MUST treat this as a connection error of type HTTP_DUPLICATE_PUSH.
client MUST treat this as a connection error of type HTTP_ID_ERROR.

### Reserved Stream Types {#stream-grease}

Expand Down Expand Up @@ -1258,7 +1258,7 @@ error of type HTTP_MALFORMED_FRAME.

A PRIORITY frame that references a non-existent Push ID, a Placeholder ID
greater than the server's limit, or a Stream ID the client is not yet permitted
to open MUST be treated as a connection error of type HTTP_LIMIT_EXCEEDED.
to open MUST be treated as a connection error of type HTTP_ID_ERROR.

A PRIORITY frame received on any stream other than the control stream MUST be
treated as a connection error of type HTTP_WRONG_STREAM.
Expand Down Expand Up @@ -1439,10 +1439,13 @@ Header Block:
for more details.

A server MUST NOT use a Push ID that is larger than the client has provided in a
MAX_PUSH_ID frame ({{frame-max-push-id}}) and MUST NOT use the same Push ID in
multiple PUSH_PROMISE frames. A client MUST treat receipt of a PUSH_PROMISE
that contains a larger Push ID than the client has advertised or a Push ID which
has already been promised as a connection error of type HTTP_MALFORMED_FRAME.
MAX_PUSH_ID frame ({{frame-max-push-id}}). A client MUST treat receipt of a
PUSH_PROMISE frame that contains a larger Push ID than the client has advertised
as a connection error of HTTP_ID_ERROR.

A server MUST NOT use the same Push ID in multiple PUSH_PROMISE frames. A client
MUST treat receipt of a Push ID which has already been promised as a connection
error of type HTTP_ID_ERROR.

If a PUSH_PROMISE frame is received on the control stream, the client MUST
respond with a connection error ({{errors}}) of type HTTP_WRONG_STREAM.
Expand Down Expand Up @@ -1517,7 +1520,7 @@ The MAX_PUSH_ID frame carries a single variable-length integer that identifies
the maximum value for a Push ID that the server can use (see
{{frame-push-promise}}). A MAX_PUSH_ID frame cannot reduce the maximum 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 HTTP_MALFORMED_FRAME.
MUST be treated as a connection error of type HTTP_ID_ERROR.

### DUPLICATE_PUSH {#frame-duplicate-push}

Expand Down Expand Up @@ -1546,7 +1549,7 @@ identifies the Push ID of a resource that the server has previously promised
this frame. A server MUST NOT use a Push ID that is larger than the client has
provided in a MAX_PUSH_ID frame ({{frame-max-push-id}}). A client MUST treat
receipt of a DUPLICATE_PUSH that contains a larger Push ID than the client has
advertised as a connection error of type HTTP_MALFORMED_FRAME.
advertised as a connection error of type HTTP_ID_ERROR.

This frame allows the server to use the same server push in response to multiple
concurrent requests. Referencing the same server push ensures that a promise
Expand Down Expand Up @@ -1628,12 +1631,12 @@ HTTP_VERSION_FALLBACK (0x09):
HTTP_WRONG_STREAM (0x0A):
: A frame was received on a stream where it is not permitted.

HTTP_LIMIT_EXCEEDED (0x0B):
: A Stream ID, Push ID, or Placeholder ID greater than the current maximum for
that identifier was referenced.
HTTP_ID_ERROR (0x0B):
: A Stream ID, Push ID, or Placeholder ID was used incorrectly, such as
exceeding a limit, reducing a limit, or being reused.

HTTP_DUPLICATE_PUSH (0x0C):
: A Push ID was referenced in two different stream headers.
Reserved (0x0C):
: N/A

HTTP_UNKNOWN_STREAM_TYPE (0x0D):
: A unidirectional stream header contained an unknown stream type.
Expand Down Expand Up @@ -1911,8 +1914,8 @@ The entries in the following table are registered by this document.
| HTTP_EXCESSIVE_LOAD | 0x0008 | Peer generating excessive load | {{http-error-codes}} |
| HTTP_VERSION_FALLBACK | 0x0009 | Retry over HTTP/1.1 | {{http-error-codes}} |
| HTTP_WRONG_STREAM | 0x000A | A frame was sent on the wrong stream | {{http-error-codes}} |
| HTTP_LIMIT_EXCEEDED | 0x000B | An identifier limit was exceeded | {{http-error-codes}} |
| HTTP_DUPLICATE_PUSH | 0x000C | Push ID was fulfilled multiple times | {{http-error-codes}} |
| HTTP_ID_ERROR | 0x000B | An identifier was used incorrectly | {{http-error-codes}} |
| Reserved | 0x000C | N/A | N/A |
| HTTP_UNKNOWN_STREAM_TYPE | 0x000D | Unknown unidirectional stream type | {{http-error-codes}} |
| HTTP_WRONG_STREAM_COUNT | 0x000E | Too many unidirectional streams | {{http-error-codes}} |
| HTTP_CLOSED_CRITICAL_STREAM | 0x000F | Critical stream was closed | {{http-error-codes}} |
Expand Down

0 comments on commit 4d2900c

Please sign in to comment.