forked from quic-go/quic-go
http3: reject responses that don't set the :status header (#3975)
This commit is contained in:
@@ -317,6 +317,14 @@ var _ = Describe("Response", func() {
|
||||
Expect(err).To(MatchError("received pseudo header :status after a regular header field"))
|
||||
})
|
||||
|
||||
It("rejects response with no status field", func() {
|
||||
headers := []qpack.HeaderField{
|
||||
{Name: "content-length", Value: "42"},
|
||||
}
|
||||
_, err := responseFromHeaders(headers)
|
||||
Expect(err).To(MatchError("missing status field"))
|
||||
})
|
||||
|
||||
It("rejects invalid status codes", func() {
|
||||
headers := []qpack.HeaderField{
|
||||
{Name: ":status", Value: "foobar"},
|
||||
|
||||
Reference in New Issue
Block a user