multipleHeadersContentLength() — netty Function Reference
Architecture documentation for the multipleHeadersContentLength() function in DefaultHttp2ConnectionDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD f9c2d5fe_2f6f_3808_7d0f_1e7120999ca4["multipleHeadersContentLength()"] 7c0b580c_3a1b_cdb3_bf02_2ffea3bbdffc["DefaultHttp2ConnectionDecoderTest"] f9c2d5fe_2f6f_3808_7d0f_1e7120999ca4 -->|defined in| 7c0b580c_3a1b_cdb3_bf02_2ffea3bbdffc afc9cb1c_0745_2bfc_675d_b08f180c9743["multipleHeadersContentLengthSame()"] afc9cb1c_0745_2bfc_675d_b08f180c9743 -->|calls| f9c2d5fe_2f6f_3808_7d0f_1e7120999ca4 16d787c5_0b27_2b84_8749_bb2b358ec85e["multipleHeadersContentLengthDifferent()"] 16d787c5_0b27_2b84_8749_bb2b358ec85e -->|calls| f9c2d5fe_2f6f_3808_7d0f_1e7120999ca4 style f9c2d5fe_2f6f_3808_7d0f_1e7120999ca4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoderTest.java lines 1005–1034
private void multipleHeadersContentLength(boolean same) throws Exception {
final int padding = 10;
when(connection.isServer()).thenReturn(true);
final Http2Headers headers = new DefaultHttp2Headers();
if (same) {
headers.addLong(HttpHeaderNames.CONTENT_LENGTH, 0);
headers.addLong(HttpHeaderNames.CONTENT_LENGTH, 0);
} else {
headers.addLong(HttpHeaderNames.CONTENT_LENGTH, 0);
headers.addLong(HttpHeaderNames.CONTENT_LENGTH, 1);
}
if (same) {
decode().onHeadersRead(ctx, STREAM_ID, headers, padding, true);
verify(listener, times(1)).onHeadersRead(eq(ctx), anyInt(),
any(Http2Headers.class), anyInt(), anyShort(), anyBoolean(), anyInt(), anyBoolean());
assertEquals(1, headers.getAll(HttpHeaderNames.CONTENT_LENGTH).size());
} else {
assertThrows(Http2Exception.StreamException.class, new Executable() {
@Override
public void execute() throws Throwable {
decode().onHeadersRead(ctx, STREAM_ID, headers, padding, true);
}
});
// Verify that the event was absorbed and not propagated to the observer.
verify(listener, never()).onHeadersRead(eq(ctx), anyInt(),
any(Http2Headers.class), anyInt(), anyShort(), anyBoolean(), anyInt(), anyBoolean());
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does multipleHeadersContentLength() do?
multipleHeadersContentLength() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoderTest.java.
Where is multipleHeadersContentLength() defined?
multipleHeadersContentLength() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoderTest.java at line 1005.
What calls multipleHeadersContentLength()?
multipleHeadersContentLength() is called by 2 function(s): multipleHeadersContentLengthDifferent, multipleHeadersContentLengthSame.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free