Draft: draft-ietf-quic-http

Commentary: … RONG_STREAM into it Renaming the error to align with a suggestion from made somewhere . This is a less drastic version of . It too 
 Note : I got some questions about the renumbering of the error codes ; I went ahead and took it because we 've had a massive renumbering since the last published draft anyway . If we 'd published the draft with the old numbering , I would have just left the hole . 
 HTTPWRONGSTREAM and HTTPUNEXPECTEDFRAME are used a lot and very similar . The former is used by a peer that receives a valid frame on a stream that it should never be sent on , the latter is used by a peer that receives a valid frame on a stream that is normally ok but has transitioned to an application - level stream state which prohibits it . Rationalising these seems like a logical option . 
 Yes , I like this better than .
Paragraph (version A):
If an endpoint receives an invalid sequence of frames on either a
request or a push stream, it MUST respond with a connection error of
type HTTP_UNEXPECTED_FRAME (errors).  In particular, a DATA frame
before any HEADERS frame, or a HEADERS or DATA frame after the
trailing HEADERS frame is considered invalid.
Paragraph (version B):
If an endpoint receives an invalid sequence of frames on either a
request or a push stream, it MUST respond with a connection error of
type HTTP_FRAME_UNEXPECTED (errors).  In particular, a DATA frame
before any HEADERS frame, or a HEADERS or DATA frame after the
trailing HEADERS frame is considered invalid.
Paragraph (version A):
Once the CONNECT method has completed, only DATA frames are permitted
to be sent on the stream.  Extension frames MAY be used if
specifically permitted by the definition of the extension.  Receipt
of any other frame type MUST be treated as a connection error of type
HTTP_UNEXPECTED_FRAME.
Paragraph (version B):
Once the CONNECT method has completed, only DATA frames are permitted
to be sent on the stream.  Extension frames MAY be used if
specifically permitted by the definition of the extension.  Receipt
of any other frame type MUST be treated as a connection error of type
HTTP_FRAME_UNEXPECTED.
Paragraph (version A):
DATA frames MUST be associated with an HTTP request or response.  If
a DATA frame is received on a control stream, the recipient MUST
respond with a connection error (errors) of type HTTP_WRONG_STREAM.
Paragraph (version B):
DATA frames MUST be associated with an HTTP request or response.  If
a DATA frame is received on a control stream, the recipient MUST
respond with a connection error (errors) of type
HTTP_FRAME_UNEXPECTED.
Paragraph (version A):
HEADERS frames can only be sent on request / push streams.  If a
HEADERS frame is received on a control stream, the recipient MUST
respond with a connection error (errors) of type HTTP_WRONG_STREAM.
Paragraph (version B):
HEADERS frames can only be sent on request / push streams.  If a
HEADERS frame is received on a control stream, the recipient MUST
respond with a connection error (errors) of type
HTTP_FRAME_UNEXPECTED.
Paragraph (version A):
A CANCEL_PUSH frame is sent on the control stream.  Receiving a
CANCEL_PUSH frame on a stream other than the control stream MUST be
treated as a connection error of type HTTP_WRONG_STREAM.
Paragraph (version B):
A CANCEL_PUSH frame is sent on the control stream.  Receiving a
CANCEL_PUSH frame on a stream other than the control stream MUST be
treated as a connection error of type HTTP_FRAME_UNEXPECTED.
Paragraph (version A):
SETTINGS frames always apply to a connection, never a single stream.
A SETTINGS frame MUST be sent as the first frame of each control
stream (see control-streams) by each peer, and MUST NOT be sent
subsequently.  If an endpoint receives a second SETTINGS frame on the
control stream, the endpoint MUST respond with a connection error of
type HTTP_UNEXPECTED_FRAME.
Paragraph (version A):
SETTINGS frames MUST NOT be sent on any stream other than the control
stream.  If an endpoint receives a SETTINGS frame on a different
stream, the endpoint MUST respond with a connection error of type
HTTP_WRONG_STREAM.
Paragraph (version B):
SETTINGS frames always apply to a connection, never a single stream.
A SETTINGS frame MUST be sent as the first frame of each control
stream (see control-streams) by each peer, and MUST NOT be sent
subsequently.  If an endpoint receives a second SETTINGS frame on the
control stream, the endpoint MUST respond with a connection error of
type HTTP_FRAME_UNEXPECTED.
Paragraph (version B):
SETTINGS frames MUST NOT be sent on any stream other than the control
stream.  If an endpoint receives a SETTINGS frame on a different
stream, the endpoint MUST respond with a connection error of type
HTTP_FRAME_UNEXPECTED.
Paragraph (version A):
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.
Paragraph (version A):
A client MUST NOT send a PUSH_PROMISE frame.  A server MUST treat the
receipt of a PUSH_PROMISE frame as a connection error of type
HTTP_UNEXPECTED_FRAME.
Paragraph (version B):
If a PUSH_PROMISE frame is received on the control stream, the client
MUST respond with a connection error (errors) of type
HTTP_FRAME_UNEXPECTED.
Paragraph (version B):
A client MUST NOT send a PUSH_PROMISE frame.  A server MUST treat the
receipt of a PUSH_PROMISE frame as a connection error of type
HTTP_FRAME_UNEXPECTED.
Paragraph (version A):
Clients do not need to send GOAWAY to initiate a graceful shutdown;
they simply stop making new requests.  A server MUST treat receipt of
a GOAWAY frame on any stream as a connection error (errors) of type
HTTP_UNEXPECTED_FRAME.
Paragraph (version A):
The GOAWAY frame applies to the connection, not a specific stream.  A
client MUST treat a GOAWAY frame on a stream other than the control
stream as a connection error (errors) of type HTTP_WRONG_STREAM.
Paragraph (version B):
Clients do not need to send GOAWAY to initiate a graceful shutdown;
they simply stop making new requests.  A server MUST treat receipt of
a GOAWAY frame on any stream as a connection error (errors) of type
HTTP_FRAME_UNEXPECTED.
Paragraph (version B):
The GOAWAY frame applies to the connection, not a specific stream.  A
client MUST treat a GOAWAY frame on a stream other than the control
stream as a connection error (errors) of type HTTP_FRAME_UNEXPECTED.
Paragraph (version A):
The MAX_PUSH_ID frame is always sent on the control stream.  Receipt
of a MAX_PUSH_ID frame on any other stream MUST be treated as a
connection error of type HTTP_WRONG_STREAM.
Paragraph (version A):
A server MUST NOT send a MAX_PUSH_ID frame.  A client MUST treat the
receipt of a MAX_PUSH_ID frame as a connection error of type
HTTP_UNEXPECTED_FRAME.
Paragraph (version B):
The MAX_PUSH_ID frame is always sent on the control stream.  Receipt
of a MAX_PUSH_ID frame on any other stream MUST be treated as a
connection error of type HTTP_FRAME_UNEXPECTED.
Paragraph (version B):
A server MUST NOT send a MAX_PUSH_ID frame.  A client MUST treat the
receipt of a MAX_PUSH_ID frame as a connection error of type
HTTP_FRAME_UNEXPECTED.
Paragraph (version A):
The DUPLICATE_PUSH frame is always sent on a request stream.  Receipt
of a DUPLICATE_PUSH frame on any other stream MUST be treated as a
connection error of type HTTP_WRONG_STREAM.
Paragraph (version A):
A client MUST NOT send a DUPLICATE_PUSH frame.  A server MUST treat
the receipt of a DUPLICATE_PUSH frame as a connection error of type
HTTP_UNEXPECTED_FRAME.
Paragraph (version B):
The DUPLICATE_PUSH frame is always sent on a request stream.  Receipt
of a DUPLICATE_PUSH frame on any other stream MUST be treated as a
connection error of type HTTP_FRAME_UNEXPECTED.
Paragraph (version B):
A client MUST NOT send a DUPLICATE_PUSH frame.  A server MUST treat
the receipt of a DUPLICATE_PUSH frame as a connection error of type
HTTP_FRAME_UNEXPECTED.
Paragraph (version A):
A frame was received which was not permitted in the current state.
Paragraph (version B):
A frame was received which was not permitted in the current state
or on the current stream.
Paragraph (version A):
A frame was received on a stream where it is not permitted.