failedValidationDoesntCorruptHpack() — netty Function Reference
Architecture documentation for the failedValidationDoesntCorruptHpack() function in HpackDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3bc4116a_584a_7cab_5dd0_9efafedc72bf["failedValidationDoesntCorruptHpack()"] 499468ca_3853_024b_2b80_17090ef6cd43["HpackDecoderTest"] 3bc4116a_584a_7cab_5dd0_9efafedc72bf -->|defined in| 499468ca_3853_024b_2b80_17090ef6cd43 47ac4151_0b50_9884_0d18_472d1c51065d["decode()"] 3bc4116a_584a_7cab_5dd0_9efafedc72bf -->|calls| 47ac4151_0b50_9884_0d18_472d1c51065d style 3bc4116a_584a_7cab_5dd0_9efafedc72bf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/HpackDecoderTest.java lines 828–865
@Test
public void failedValidationDoesntCorruptHpack() throws Exception {
final ByteBuf in1 = Unpooled.buffer(200);
ByteBuf in2 = Unpooled.buffer(200);
try {
HpackEncoder hpackEncoder = new HpackEncoder(true);
Http2Headers toEncode = new DefaultHttp2Headers();
toEncode.add(":method", "GET");
toEncode.add(":status", "200");
toEncode.add("foo", "bar");
hpackEncoder.encodeHeaders(1, in1, toEncode, NEVER_SENSITIVE);
final Http2Headers decoded = new DefaultHttp2Headers();
Http2Exception.StreamException expected =
assertThrows(Http2Exception.StreamException.class, new Executable() {
@Override
public void execute() throws Throwable {
hpackDecoder.decode(1, in1, decoded, true);
}
});
assertEquals(1, expected.streamId());
// Do it again, this time without validation, to make sure the HPACK state is still sane.
decoded.clear();
hpackEncoder.encodeHeaders(1, in2, toEncode, NEVER_SENSITIVE);
hpackDecoder.decode(1, in2, decoded, false);
assertEquals(3, decoded.size());
assertEquals("GET", decoded.method().toString());
assertEquals("200", decoded.status().toString());
assertEquals("bar", decoded.get("foo").toString());
} finally {
in1.release();
in2.release();
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does failedValidationDoesntCorruptHpack() do?
failedValidationDoesntCorruptHpack() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/HpackDecoderTest.java.
Where is failedValidationDoesntCorruptHpack() defined?
failedValidationDoesntCorruptHpack() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/HpackDecoderTest.java at line 828.
What does failedValidationDoesntCorruptHpack() call?
failedValidationDoesntCorruptHpack() calls 1 function(s): decode.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free