Home / Function/ illegalCharInCookieNameMakesStrictEncoderThrowsException() — netty Function Reference

illegalCharInCookieNameMakesStrictEncoderThrowsException() — netty Function Reference

Architecture documentation for the illegalCharInCookieNameMakesStrictEncoderThrowsException() function in ServerCookieEncoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5ee80b38_ce79_84d7_426d_6533edc99d4d["illegalCharInCookieNameMakesStrictEncoderThrowsException()"]
  8f5d85cb_9261_ef89_d9fb_1265f8ca3574["ServerCookieEncoderTest"]
  5ee80b38_ce79_84d7_426d_6533edc99d4d -->|defined in| 8f5d85cb_9261_ef89_d9fb_1265f8ca3574
  style 5ee80b38_ce79_84d7_426d_6533edc99d4d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/cookie/ServerCookieEncoderTest.java lines 86–111

    @Test
    public void illegalCharInCookieNameMakesStrictEncoderThrowsException() {
        Set<Character> illegalChars = new HashSet<Character>();
        // CTLs
        for (int i = 0x00; i <= 0x1F; i++) {
            illegalChars.add((char) i);
        }
        illegalChars.add((char) 0x7F);
        // separators
        for (char c : new char[] { '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']',
                '?', '=', '{', '}', ' ', '\t' }) {
            illegalChars.add(c);
        }

        int exceptions = 0;

        for (char c : illegalChars) {
            try {
                ServerCookieEncoder.STRICT.encode(new DefaultCookie("foo" + c + "bar", "value"));
            } catch (IllegalArgumentException e) {
                exceptions++;
            }
        }

        assertEquals(illegalChars.size(), exceptions);
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free