Home / Function/ validateCookie() — netty Function Reference

validateCookie() — netty Function Reference

Architecture documentation for the validateCookie() function in CookieEncoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  1c22f473_c132_a127_c133_789aaad34f23["validateCookie()"]
  4ea47c19_437a_8843_e413_6bb9db1b9ca4["CookieEncoder"]
  1c22f473_c132_a127_c133_789aaad34f23 -->|defined in| 4ea47c19_437a_8843_e413_6bb9db1b9ca4
  style 1c22f473_c132_a127_c133_789aaad34f23 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/cookie/CookieEncoder.java lines 33–51

    protected void validateCookie(String name, String value) {
        if (strict) {
            int pos;

            if ((pos = firstInvalidCookieNameOctet(name)) >= 0) {
                throw new IllegalArgumentException("Cookie name contains an invalid char: " + name.charAt(pos));
            }

            CharSequence unwrappedValue = unwrapValue(value);
            if (unwrappedValue == null) {
                throw new IllegalArgumentException("Cookie value wrapping quotes are not balanced: " + value);
            }

            if ((pos = firstInvalidCookieValueOctet(unwrappedValue)) >= 0) {
                throw new IllegalArgumentException("Cookie value contains an invalid char: " +
                                                   unwrappedValue.charAt(pos));
            }
        }
    }

Subdomains

Frequently Asked Questions

What does validateCookie() do?
validateCookie() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/cookie/CookieEncoder.java.
Where is validateCookie() defined?
validateCookie() is defined in codec-http/src/main/java/io/netty/handler/codec/http/cookie/CookieEncoder.java at line 33.

Analyze Your Own Codebase

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

Try Supermodel Free