testQuotedBoundary() — netty Function Reference
Architecture documentation for the testQuotedBoundary() function in HttpPostRequestDecoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 03672b83_bc1e_6747_1ec7_2883643e9986["testQuotedBoundary()"] d3dadcbe_07b1_86dc_3f34_5a56e9d1367e["HttpPostRequestDecoderTest"] 03672b83_bc1e_6747_1ec7_2883643e9986 -->|defined in| d3dadcbe_07b1_86dc_3f34_5a56e9d1367e style 03672b83_bc1e_6747_1ec7_2883643e9986 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostRequestDecoderTest.java lines 198–228
@Test
public void testQuotedBoundary() throws Exception {
final String boundary = "dLV9Wyq26L_-JQxk6ferf-RT153LhOO";
final DefaultFullHttpRequest req = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST,
"http://localhost");
req.setDecoderResult(DecoderResult.SUCCESS);
req.headers().add(HttpHeaderNames.CONTENT_TYPE, "multipart/form-data; boundary=\"" + boundary + '"');
req.headers().add(HttpHeaderNames.TRANSFER_ENCODING, HttpHeaderValues.CHUNKED);
// Force to use memory-based data.
final DefaultHttpDataFactory inMemoryFactory = new DefaultHttpDataFactory(false);
for (String data : Arrays.asList("", "\r", "\r\r", "\r\r\r")) {
final String body =
"--" + boundary + "\r\n" +
"Content-Disposition: form-data; name=\"file\"; filename=\"tmp-0.txt\"\r\n" +
"Content-Type: image/gif\r\n" +
"\r\n" +
data + "\r\n" +
"--" + boundary + "--\r\n";
req.content().writeBytes(body.getBytes(CharsetUtil.UTF_8));
}
// Create decoder instance to test.
final HttpPostRequestDecoder decoder = new HttpPostRequestDecoder(inMemoryFactory, req);
assertFalse(decoder.getBodyHttpDatas().isEmpty());
decoder.destroy();
assertTrue(req.release());
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does testQuotedBoundary() do?
testQuotedBoundary() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostRequestDecoderTest.java.
Where is testQuotedBoundary() defined?
testQuotedBoundary() is defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostRequestDecoderTest.java at line 198.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free