testLastResponseWithHeaderRemoveTrailingSpaces() — netty Function Reference
Architecture documentation for the testLastResponseWithHeaderRemoveTrailingSpaces() function in HttpResponseDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 27fc281e_cebd_5eb9_0dac_d9c0efea9b08["testLastResponseWithHeaderRemoveTrailingSpaces()"] 90546a8c_51c4_a9dc_b6e8_695d29269596["HttpResponseDecoderTest"] 27fc281e_cebd_5eb9_0dac_d9c0efea9b08 -->|defined in| 90546a8c_51c4_a9dc_b6e8_695d29269596 style 27fc281e_cebd_5eb9_0dac_d9c0efea9b08 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java lines 538–563
@Test
public void testLastResponseWithHeaderRemoveTrailingSpaces() {
EmbeddedChannel ch = new EmbeddedChannel(new HttpResponseDecoder());
ch.writeInbound(Unpooled.copiedBuffer(
"HTTP/1.1 200 OK\r\nX-Header: h2=h2v2; Expires=Wed, 09-Jun-2021 10:18:14 GMT \r\n\r\n",
CharsetUtil.US_ASCII));
HttpResponse res = ch.readInbound();
assertSame(HttpVersion.HTTP_1_1, res.protocolVersion());
assertEquals(HttpResponseStatus.OK, res.status());
assertEquals("h2=h2v2; Expires=Wed, 09-Jun-2021 10:18:14 GMT", res.headers().get(of("X-Header")));
assertNull(ch.readInbound());
ch.writeInbound(Unpooled.wrappedBuffer(new byte[1024]));
HttpContent content = ch.readInbound();
assertEquals(1024, content.content().readableBytes());
content.release();
assertTrue(ch.finish());
LastHttpContent lastContent = ch.readInbound();
assertFalse(lastContent.content().isReadable());
lastContent.release();
assertNull(ch.readInbound());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testLastResponseWithHeaderRemoveTrailingSpaces() do?
testLastResponseWithHeaderRemoveTrailingSpaces() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java.
Where is testLastResponseWithHeaderRemoveTrailingSpaces() defined?
testLastResponseWithHeaderRemoveTrailingSpaces() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpResponseDecoderTest.java at line 538.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free