testFailSlowHeaderTooLong() — netty Function Reference
Architecture documentation for the testFailSlowHeaderTooLong() function in HAProxyMessageDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 155b2fa4_be8c_51b0_1132_a548fcc15994["testFailSlowHeaderTooLong()"] 88909aff_3546_2e28_19d9_812a1929ee17["HAProxyMessageDecoderTest"] 155b2fa4_be8c_51b0_1132_a548fcc15994 -->|defined in| 88909aff_3546_2e28_19d9_812a1929ee17 style 155b2fa4_be8c_51b0_1132_a548fcc15994 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoderTest.java lines 229–252
@Test
public void testFailSlowHeaderTooLong() {
final EmbeddedChannel slowFailCh = new EmbeddedChannel(new HAProxyMessageDecoder(false));
try {
String headerPart1 = "PROXY TCP4 192.168.0.1 192.168.0.11 56324 " +
"000000000000000000000000000000000000000000000000000000000000000000000443";
// Should not throw exception
assertFalse(slowFailCh.writeInbound(copiedBuffer(headerPart1, CharsetUtil.US_ASCII)));
String headerPart2 = "more header data";
// Should not throw exception
assertFalse(slowFailCh.writeInbound(copiedBuffer(headerPart2, CharsetUtil.US_ASCII)));
final String headerPart3 = "end of header\r\n";
int discarded = headerPart1.length() + headerPart2.length() + headerPart3.length() - 2;
assertThrows(HAProxyProtocolException.class, new Executable() {
@Override
public void execute() {
slowFailCh.writeInbound(copiedBuffer(headerPart3, CharsetUtil.US_ASCII));
}
}, "over " + discarded);
} finally {
assertFalse(slowFailCh.finishAndReleaseAll());
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does testFailSlowHeaderTooLong() do?
testFailSlowHeaderTooLong() is a function in the netty codebase, defined in codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoderTest.java.
Where is testFailSlowHeaderTooLong() defined?
testFailSlowHeaderTooLong() is defined in codec-haproxy/src/test/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoderTest.java at line 229.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free