Home / Function/ splitValidCookieHeader() — netty Function Reference

splitValidCookieHeader() — netty Function Reference

Architecture documentation for the splitValidCookieHeader() function in HttpConversionUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  6dc1e856_6655_f72d_37e8_0d71045d347f["splitValidCookieHeader()"]
  0560b510_c1dc_0a46_6dca_e5dbfb67d807["HttpConversionUtil"]
  6dc1e856_6655_f72d_37e8_0d71045d347f -->|defined in| 0560b510_c1dc_0a46_6dca_e5dbfb67d807
  6d71d73b_826f_80a2_d574_05df829c5c40["toHttp2Headers()"]
  6d71d73b_826f_80a2_d574_05df829c5c40 -->|calls| 6dc1e856_6655_f72d_37e8_0d71045d347f
  style 6dc1e856_6655_f72d_37e8_0d71045d347f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java lines 566–592

    private static void splitValidCookieHeader(Http2Headers out, CharSequence valueCs) {
        try {
            AsciiString value = AsciiString.of(valueCs);
            // split up cookies to allow for better compression
            // https://tools.ietf.org/html/rfc7540#section-8.1.2.5
            int index = value.forEachByte(FIND_SEMI_COLON);
            if (index != -1) {
                int start = 0;
                do {
                    out.add(COOKIE, value.subSequence(start, index, false));
                    assert index + 1 < value.length();
                    assert value.charAt(index + 1) == ' ';
                    // skip 2 characters "; " (see https://tools.ietf.org/html/rfc6265#section-4.2.1)
                    start = index + 2;
                } while (start < value.length() &&
                        (index = value.forEachByte(start, value.length() - start, FIND_SEMI_COLON)) != -1);
                assert start < value.length();
                out.add(COOKIE, value.subSequence(start, value.length(), false));
            } else {
                out.add(COOKIE, value);
            }
        } catch (Exception e) {
            // This is not expect to happen because FIND_SEMI_COLON never throws but must be caught
            // because of the ByteProcessor interface.
            throw new IllegalStateException(e);
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does splitValidCookieHeader() do?
splitValidCookieHeader() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java.
Where is splitValidCookieHeader() defined?
splitValidCookieHeader() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java at line 566.
What calls splitValidCookieHeader()?
splitValidCookieHeader() is called by 1 function(s): toHttp2Headers.

Analyze Your Own Codebase

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

Try Supermodel Free