Home / Function/ testDecodeFullHttpRequestWithUrlEncodedBodyWithBrokenHexByte0() — netty Function Reference

testDecodeFullHttpRequestWithUrlEncodedBodyWithBrokenHexByte0() — netty Function Reference

Architecture documentation for the testDecodeFullHttpRequestWithUrlEncodedBodyWithBrokenHexByte0() function in HttpPostRequestDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  92413fa7_411c_fc49_6d63_5f2ffd781af0["testDecodeFullHttpRequestWithUrlEncodedBodyWithBrokenHexByte0()"]
  d3dadcbe_07b1_86dc_3f34_5a56e9d1367e["HttpPostRequestDecoderTest"]
  92413fa7_411c_fc49_6d63_5f2ffd781af0 -->|defined in| d3dadcbe_07b1_86dc_3f34_5a56e9d1367e
  style 92413fa7_411c_fc49_6d63_5f2ffd781af0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostRequestDecoderTest.java lines 895–910

    @Test
    public void testDecodeFullHttpRequestWithUrlEncodedBodyWithBrokenHexByte0() {
        byte[] bodyBytes = "foo=bar&a=b&empty=%&city=paris".getBytes();
        ByteBuf content = Unpooled.directBuffer(bodyBytes.length);
        content.writeBytes(bodyBytes);

        FullHttpRequest req = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/", content);
        try {
            new HttpPostRequestDecoder(req);
            fail("Was expecting an ErrorDataDecoderException");
        } catch (HttpPostRequestDecoder.ErrorDataDecoderException e) {
            assertEquals("Invalid hex byte at index '0' in string: '%'", e.getMessage());
        } finally {
            assertTrue(req.release());
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testDecodeFullHttpRequestWithUrlEncodedBodyWithBrokenHexByte0() do?
testDecodeFullHttpRequestWithUrlEncodedBodyWithBrokenHexByte0() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostRequestDecoderTest.java.
Where is testDecodeFullHttpRequestWithUrlEncodedBodyWithBrokenHexByte0() defined?
testDecodeFullHttpRequestWithUrlEncodedBodyWithBrokenHexByte0() is defined in codec-http/src/test/java/io/netty/handler/codec/http/multipart/HttpPostRequestDecoderTest.java at line 895.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free