netty5/codec-http2/src/test/resources/io/netty/handler/codec/http2/testdata
Julien Hoarau 3e6b54bb59 Fix failing h2spec tests 8.1.2.1 related to pseudo-headers validation
Motivation:

According to the spec:
All pseudo-header fields MUST appear in the header block before regular
header fields. Any request or response that contains a pseudo-header
field that appears in a header block after
a regular header field MUST be treated as malformed (Section 8.1.2.6).

Pseudo-header fields are only valid in the context in which they are defined.
Pseudo-header fields defined for requests MUST NOT appear in responses;
pseudo-header fields defined for responses MUST NOT appear in requests.
Pseudo-header fields MUST NOT appear in trailers.
Endpoints MUST treat a request or response that contains undefined or
invalid pseudo-header fields as malformed (Section 8.1.2.6).

Clients MUST NOT accept a malformed response. Note that these requirements
are intended to protect against several types of common attacks against HTTP;
they are deliberately strict because being permissive can expose
implementations to these vulnerabilities.

Modifications:

- Introduce validation in HPackDecoder

Result:

- Requests with unknown pseudo-field headers are rejected
- Requests with containing response specific pseudo-headers are rejected
- Requests where pseudo-header appear after regular header are rejected
- h2spec 8.1.2.1 pass
2018-01-29 19:42:56 -08:00
..
testDuplicateHeaders.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testEmpty.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testEviction.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testMaxHeaderTableSize.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testSpecExampleC2_1.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testSpecExampleC2_2.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testSpecExampleC2_3.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testSpecExampleC2_4.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testSpecExampleC3.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testSpecExampleC4.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testSpecExampleC5.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testSpecExampleC6.json HTTP/2 move internal HPACK classes to the http2 package 2017-03-02 07:42:41 -08:00
testStaticTableEntries.json Fix failing h2spec tests 8.1.2.1 related to pseudo-headers validation 2018-01-29 19:42:56 -08:00
testStaticTableResponseEntries.json Fix failing h2spec tests 8.1.2.1 related to pseudo-headers validation 2018-01-29 19:42:56 -08:00