@Test public void responsePseudoHeaderInRequest() throws Exception { ByteBuf in = Unpooled.buffer(200); try { HpackEncoder hpackEncoder = new HpackEncoder(true); Http2Headers toEncode = new DefaultHttp2Headers(); toEncode.add(":method", "GET"); toEncode.add(":status", "200"); hpackEncoder.encodeHeaders(1, in, toEncode, NEVER_SENSITIVE); Http2Headers decoded = new DefaultHttp2Headers(); expectedException.expect(Http2Exception.class); hpackDecoder.decode(1, in, decoded, true); } finally { in.release(); } }
public void decode(int streamId, ByteBuf in, Http2Headers headers, boolean validateHeaders) throws Http2Exception { Http2HeadersSink sink = new Http2HeadersSink(headers, maxHeaderListSize); decode(in, sink, validateHeaders); if (sink.exceededMaxLength()) { headerListSizeExceeded(streamId, maxHeaderListSize, true); } }
HpackDecoder { public void decode(int streamId, ByteBuf in, Http2Headers headers, boolean validateHeaders) throws Http2Exception { Http2HeadersSink sink = new Http2HeadersSink(headers, maxHeaderListSize); decode(in, sink, validateHeaders); if (sink.exceededMaxLength()) { headerListSizeExceeded(streamId, maxHeaderListSize, true); } } }
HpackDecoder { public void decode(int streamId, ByteBuf in, Http2Headers headers, boolean validateHeaders) throws Http2Exception { Http2HeadersSink sink = new Http2HeadersSink(headers, maxHeaderListSize); decode(in, sink, validateHeaders); if (sink.exceededMaxLength()) { headerListSizeExceeded(streamId, maxHeaderListSize, true); } } HpackDecoder(long maxHeaderListSize, int initialHuffmanDecodeCapacity);   HpackDecoder(long maxHeaderListSize, int initialHuffmanDecodeCapacity, int maxHeaderTableSize); }
HpackDecoder { public void decode(int streamId, ByteBuf in, Http2Headers headers, boolean validateHeaders) throws Http2Exception { Http2HeadersSink sink = new Http2HeadersSink(headers, maxHeaderListSize); decode(in, sink, validateHeaders); if (sink.exceededMaxLength()) { headerListSizeExceeded(streamId, maxHeaderListSize, true); } } HpackDecoder(long maxHeaderListSize, int initialHuffmanDecodeCapacity);   HpackDecoder(long maxHeaderListSize, int initialHuffmanDecodeCapacity, int maxHeaderTableSize); void decode(int streamId, ByteBuf in, Http2Headers headers, boolean validateHeaders); void setMaxHeaderTableSize(long maxHeaderTableSize); @Deprecated void setMaxHeaderListSize(long maxHeaderListSize, long maxHeaderListSizeGoAway); void setMaxHeaderListSize(long maxHeaderListSize); long getMaxHeaderListSize(); long getMaxHeaderTableSize(); }
HpackDecoder { public void decode(int streamId, ByteBuf in, Http2Headers headers, boolean validateHeaders) throws Http2Exception { Http2HeadersSink sink = new Http2HeadersSink(headers, maxHeaderListSize); decode(in, sink, validateHeaders); if (sink.exceededMaxLength()) { headerListSizeExceeded(streamId, maxHeaderListSize, true); } } HpackDecoder(long maxHeaderListSize, int initialHuffmanDecodeCapacity);   HpackDecoder(long maxHeaderListSize, int initialHuffmanDecodeCapacity, int maxHeaderTableSize); void decode(int streamId, ByteBuf in, Http2Headers headers, boolean validateHeaders); void setMaxHeaderTableSize(long maxHeaderTableSize); @Deprecated void setMaxHeaderListSize(long maxHeaderListSize, long maxHeaderListSizeGoAway); void setMaxHeaderListSize(long maxHeaderListSize); long getMaxHeaderListSize(); long getMaxHeaderTableSize();  }