testResponseWithBadHeader() — netty Function Reference
Architecture documentation for the testResponseWithBadHeader() function in HttpInvalidMessageTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0059ca13_2db9_ea1e_b721_7c69f7734b36["testResponseWithBadHeader()"] 9fcfe62b_bd7f_3212_a40b_cda45186b61b["HttpInvalidMessageTest"] 0059ca13_2db9_ea1e_b721_7c69f7734b36 -->|defined in| 9fcfe62b_bd7f_3212_a40b_cda45186b61b 089c961b_dc5d_1623_f43c_45ebbfde8f6a["ensureInboundTrafficDiscarded()"] 0059ca13_2db9_ea1e_b721_7c69f7734b36 -->|calls| 089c961b_dc5d_1623_f43c_45ebbfde8f6a style 0059ca13_2db9_ea1e_b721_7c69f7734b36 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpInvalidMessageTest.java lines 75–89
@Test
public void testResponseWithBadHeader() throws Exception {
EmbeddedChannel ch = new EmbeddedChannel(new HttpResponseDecoder());
ch.writeInbound(Unpooled.copiedBuffer("HTTP/1.0 200 Maybe OK\r\n", CharsetUtil.UTF_8));
ch.writeInbound(Unpooled.copiedBuffer("Good_Name: Good Value\r\n", CharsetUtil.UTF_8));
ch.writeInbound(Unpooled.copiedBuffer("Bad=Name: Bad Value\r\n", CharsetUtil.UTF_8));
ch.writeInbound(Unpooled.copiedBuffer("\r\n", CharsetUtil.UTF_8));
HttpResponse res = ch.readInbound();
DecoderResult dr = res.decoderResult();
assertFalse(dr.isSuccess());
assertTrue(dr.isFailure());
assertEquals("Maybe OK", res.status().reasonPhrase());
assertEquals("Good Value", res.headers().get(of("Good_Name")));
ensureInboundTrafficDiscarded(ch);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testResponseWithBadHeader() do?
testResponseWithBadHeader() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpInvalidMessageTest.java.
Where is testResponseWithBadHeader() defined?
testResponseWithBadHeader() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpInvalidMessageTest.java at line 75.
What does testResponseWithBadHeader() call?
testResponseWithBadHeader() calls 1 function(s): ensureInboundTrafficDiscarded.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free