-
Notifications
You must be signed in to change notification settings - Fork 80
Description
(Thank you very much for h2spec!)
h2spec http2/8 tests should accept 400 Bad Request in addition to accepting RST_STREAM or GOAWAY.
My server responds with 400 Bad Request, and h2spec http2/8 tests fail with
Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
RST_STREAM Frame (Error Code: PROTOCOL_ERROR)
Connection closed
Actual: DATA Frame (length:0, flags:0x01, stream_id:1)
RFC 7540 Section 8.1.2.6. Malformed Requests and Responses
Intermediaries that process HTTP requests or responses (i.e., any intermediary not acting as a tunnel) MUST NOT forward a malformed request or response. Malformed requests or responses that are detected MUST be treated as a stream error (Section 5.4.2) of type PROTOCOL_ERROR.
For malformed requests, a server MAY send an HTTP response prior to closing or resetting the stream.
While intermediates must send PROTOCOL_ERROR, origin servers may send a response, e.g. 400 Bad Request which tells the client "do not retry this request unmodified", instead of the generic HTTP/2 error PROTOCOL_ERROR which is less precise.
Please allow 400 Bad Request as a valid response.
(If you agree, please post so and I might learn some golang and submit a PR. :))