@Test public void testLiteralWithIncrementalIndexingCompleteEviction() throws Http2Exception { decode("4004" + hex("name") + "05" + hex("value")); verify(mockHeaders).add(of("name"), of("value")); verifyNoMoreInteractions(mockHeaders); reset(mockHeaders); StringBuilder sb = new StringBuilder(); for (int i = 0; i < 4096; i++) { sb.append('a'); } String value = sb.toString(); sb = new StringBuilder(); sb.append("417F811F"); for (int i = 0; i < 4096; i++) { sb.append("61"); } decode(sb.toString()); verify(mockHeaders).add(of(":authority"), of(value)); verifyNoMoreInteractions(mockHeaders); reset(mockHeaders); decode("4004" + hex("name") + "05" + hex("value") + "BE"); verify(mockHeaders, times(2)).add(of("name"), of("value")); verifyNoMoreInteractions(mockHeaders); }
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();  }