Home / Function/ httpVersionMustRejectIllegalTokens() — netty Function Reference

httpVersionMustRejectIllegalTokens() — netty Function Reference

Architecture documentation for the httpVersionMustRejectIllegalTokens() function in HttpVersionParsingTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  0652bc57_7956_24a8_a193_b4162c921b45["httpVersionMustRejectIllegalTokens()"]
  00ebfe61_03bc_fd95_3e17_ac055b32e5e3["HttpVersionParsingTest"]
  0652bc57_7956_24a8_a193_b4162c921b45 -->|defined in| 00ebfe61_03bc_fd95_3e17_ac055b32e5e3
  style 0652bc57_7956_24a8_a193_b4162c921b45 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpVersionParsingTest.java lines 112–161

    @ParameterizedTest
    @ValueSource(strings = {
            "HTTP ",
            " HTTP",
            "H TTP",
            " HTTP ",
            "HTTP\r",
            "HTTP\n",
            "HTTP\r\n",
            "HTT\rP",
            "HTT\nP",
            "HTT\r\nP",
            "\rHTTP",
            "\nHTTP",
            "\r\nHTTP",
            " \r\nHTTP",
            "\r \nHTTP",
            "\r\n HTTP",
            "\r\nHTTP ",
            "\nHTTP ",
            "\rHTTP ",
            "\r HTTP",
            " \rHTTP",
            "\nHTTP ",
            "\n HTTP",
            " \nHTTP",
            "HTTP \n",
            "HTTP \r",
            " HTTP\r",
            " HTTP\r",
            "HTTP \n",
            " HTTP\n",
            " HTTP\n",
            "HTT\nTP",
            "HTT\rTP",
            " HTT\rP",
            " HTT\rP",
            "HTT\nTP",
            " HTT\nP",
            " HTT\nP",
    })
    void httpVersionMustRejectIllegalTokens(String protocol) {
        try {
            HttpVersion httpVersion = new HttpVersion(protocol, 1, 0, true);
            // If no exception is thrown, then the version must have been sanitized and made safe.
            assertTrue(HttpUtil.isEncodingSafeStartLineToken(httpVersion.text()));
        } catch (IllegalArgumentException ignore) {
            // Throwing is good.
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free