It is illegal for the stream-id to not increase with each new stream. If an endpoint receives a SYN_STREAM with a stream id which is less than any previously received SYN_STREAM, it MUST issue a session error (Section 2.4.1) with the status PROTOCOL_ERROR.
It is a protocol error to send two SYN_STREAMS with the same stream-id. If a recipient receives a second SYN_STREAM for the same stream, it MUST issue a stream error (Section 2.4.2) with the status code PROTOCOL_ERROR.
Hi All,I'm working on a framework for testing SPDY servers to ensure that they meet the requirements of the SPDY spec, and have a question for the group. Section 2.4 of the spec describes two types of errors: Session and Stream. Session errors result in GOAWAY, and Stream errors result in RST_STREAM. Quoting from the spec:
- A session error is any error which occurs outside the context of a specific stream.
- A stream error is an error which occurs within the context of a stream
This seems reasonable, though it's not entirely clear what "the context of a specific stream" means. I might have thought that any problems handling a frame with a Stream ID should be considered a Stream error (in the context of that stream id), all other problems should be considered Session errors. However, Section 2.3.2 Stream Creation says:It is illegal for the stream-id to not increase with each new stream. If an endpoint receives a SYN_STREAM with a stream id which is less than any previously received SYN_STREAM, it MUST issue a session error (Section 2.4.1) with the status PROTOCOL_ERROR.
It is a protocol error to send two SYN_STREAMS with the same stream-id. If a recipient receives a second SYN_STREAM for the same stream, it MUST issue a stream error (Section 2.4.2) with the status code PROTOCOL_ERROR.
So this muddies the issue of what "the context of a specific stream" means. Here's a concrete example. The spec requires that that a SYN_STREAM frame have a value for flags of either 0x00, 0x01 or 0x02. If a SYN_STREAM frame (which is otherwise well formed) is received with a flags value of 0xFF, should this be considered a stream error in the context of the StreamID specified in the SYN_STREAM frame, or a session error? I would guess this would be a stream error, but I would not be surprised if it were a session error.