summerwind / h2spec

A conformance testing tool for HTTP/2 implementation.
MIT License
665 stars 75 forks source link

h2spec generic/5 test 1 should not send an HTTP header with an empty value #121

Open gstrauss opened 4 years ago

gstrauss commented 4 years ago

h2spec generic/5 test 1 should not send an HTTP header with an empty value. Such a header might be rejected by a server since a field-name: (empty value) is an invalid HTTP/1.1 header line.

h2spec generic/5 test 1 sends:

            // Indexed header field representation
            // (user-agent: )
            rep := []byte("\xba")

Is there a way for generic/5 test 1 (1: Sends a indexed header field representation) to send a valid header line? My server HPACK-decodes the request and returns 400 Bad Request, which passes the h2spec test. However, related to #120, if I return GOAWAY instead of 400 Bad Request, h2spec fails for generic/5 test 1.

gstrauss commented 4 years ago

Patch proposed in https://github.com/summerwind/h2spec/issues/120#issuecomment-708103532 would make this a non-issue for me, though a valid header line is still preferred for correctness of the test.

JohnMike8 commented 3 years ago

T