Home / Function/ FullHttpRequest() — netty Function Reference

FullHttpRequest() — netty Function Reference

Architecture documentation for the FullHttpRequest() function in SpdyHttpDecoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  caba727d_7991_640d_4e6b_356f29d858b3["FullHttpRequest()"]
  025fd5f9_dfbe_4042_6d63_96c1c1168bd5["SpdyHttpDecoder"]
  caba727d_7991_640d_4e6b_356f29d858b3 -->|defined in| 025fd5f9_dfbe_4042_6d63_96c1c1168bd5
  style caba727d_7991_640d_4e6b_356f29d858b3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHttpDecoder.java lines 389–429

    private static FullHttpRequest createHttpRequest(SpdyHeadersFrame requestFrame, ByteBufAllocator alloc)
       throws Exception {
        // Create the first line of the request from the name/value pairs
        SpdyHeaders headers     = requestFrame.headers();
        HttpMethod  method      = HttpMethod.valueOf(headers.getAsString(METHOD));
        String      url         = headers.getAsString(PATH);
        HttpVersion httpVersion = HttpVersion.valueOf(headers.getAsString(VERSION));
        headers.remove(METHOD);
        headers.remove(PATH);
        headers.remove(VERSION);

        boolean release = true;
        ByteBuf buffer = alloc.buffer();
        try {
            FullHttpRequest req = new DefaultFullHttpRequest(httpVersion, method, url, buffer);

            // Remove the scheme header
            headers.remove(SCHEME);

            // Replace the SPDY host header with the HTTP host header
            CharSequence host = headers.get(HOST);
            headers.remove(HOST);
            req.headers().set(HttpHeaderNames.HOST, host);

            for (Map.Entry<CharSequence, CharSequence> e : requestFrame.headers()) {
                req.headers().add(e.getKey(), e.getValue());
            }

            // The Connection and Keep-Alive headers are no longer valid
            HttpUtil.setKeepAlive(req, true);

            // Transfer-Encoding header is not valid
            req.headers().remove(HttpHeaderNames.TRANSFER_ENCODING);
            release = false;
            return req;
        } finally {
            if (release) {
                buffer.release();
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does FullHttpRequest() do?
FullHttpRequest() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHttpDecoder.java.
Where is FullHttpRequest() defined?
FullHttpRequest() is defined in codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHttpDecoder.java at line 389.

Analyze Your Own Codebase

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

Try Supermodel Free