HttpConversionUtil Class — netty Architecture
Architecture documentation for the HttpConversionUtil class in HttpConversionUtil.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD cca5f017_2e30_72b9_fc2a_eca3446d8058["HttpConversionUtil"] 1a4f7f93_6e79_9632_0c1b_8bc1d1399605["HttpConversionUtil.java"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|defined in| 1a4f7f93_6e79_9632_0c1b_8bc1d1399605 bbaf7a3f_85f5_c713_abb1_917b8bd5a565["HttpConversionUtil()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| bbaf7a3f_85f5_c713_abb1_917b8bd5a565 9078cffe_6828_6bd2_170a_090a2fc5b184["HttpResponseStatus()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| 9078cffe_6828_6bd2_170a_090a2fc5b184 d3b4c92a_bbd6_f058_19e0_e6693db2ccc6["FullHttpResponse()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| d3b4c92a_bbd6_f058_19e0_e6693db2ccc6 3c813ea4_c726_47d2_d914_26009d72f08e["CharSequence()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| 3c813ea4_c726_47d2_d914_26009d72f08e c9e66fcf_ea2b_b1d0_9e2c_28eb6a3f2038["FullHttpRequest()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| c9e66fcf_ea2b_b1d0_9e2c_28eb6a3f2038 0a0b81ed_7412_0f91_9385_95c7c4a931c7["HttpRequest()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| 0a0b81ed_7412_0f91_9385_95c7c4a931c7 765e4dae_0a18_4297_55b8_38ddc91efd80["HttpResponse()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| 765e4dae_0a18_4297_55b8_38ddc91efd80 745f9797_2af2_8204_28cb_0ad4bef05465["addHttp3ToHttpHeaders()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| 745f9797_2af2_8204_28cb_0ad4bef05465 fced85db_4e33_478e_0d61_c9c5162401e1["Http3Headers()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| fced85db_4e33_478e_0d61_c9c5162401e1 379a3e40_c6c8_5836_7be0_c1ffdac284d9["toLowercaseMap()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| 379a3e40_c6c8_5836_7be0_c1ffdac284d9 9efa8ce2_5c78_b5d4_4bf7_bf64c5e0f54f["toHttp3HeadersFilterTE()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| 9efa8ce2_5c78_b5d4_4bf7_bf64c5e0f54f 616d6333_d176_7624_5a45_c42cfec4f670["toHttp3Headers()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| 616d6333_d176_7624_5a45_c42cfec4f670 f9d03e90_9b3d_6401_30dc_63844358a8be["AsciiString()"] cca5f017_2e30_72b9_fc2a_eca3446d8058 -->|method| f9d03e90_9b3d_6401_30dc_63844358a8be
Relationship Graph
Source Code
codec-http3/src/main/java/io/netty/handler/codec/http3/HttpConversionUtil.java lines 68–647
public final class HttpConversionUtil {
/**
* The set of headers that should not be directly copied when converting headers from HTTP to HTTP/3.
*/
private static final CharSequenceMap<AsciiString> HTTP_TO_HTTP3_HEADER_BLACKLIST =
new CharSequenceMap<>();
static {
HTTP_TO_HTTP3_HEADER_BLACKLIST.add(CONNECTION, EMPTY_STRING);
@SuppressWarnings("deprecation")
AsciiString keepAlive = HttpHeaderNames.KEEP_ALIVE;
HTTP_TO_HTTP3_HEADER_BLACKLIST.add(keepAlive, EMPTY_STRING);
@SuppressWarnings("deprecation")
AsciiString proxyConnection = HttpHeaderNames.PROXY_CONNECTION;
HTTP_TO_HTTP3_HEADER_BLACKLIST.add(proxyConnection, EMPTY_STRING);
HTTP_TO_HTTP3_HEADER_BLACKLIST.add(HttpHeaderNames.TRANSFER_ENCODING, EMPTY_STRING);
HTTP_TO_HTTP3_HEADER_BLACKLIST.add(HttpHeaderNames.HOST, EMPTY_STRING);
HTTP_TO_HTTP3_HEADER_BLACKLIST.add(HttpHeaderNames.UPGRADE, EMPTY_STRING);
HTTP_TO_HTTP3_HEADER_BLACKLIST.add(ExtensionHeaderNames.STREAM_ID.text(), EMPTY_STRING);
HTTP_TO_HTTP3_HEADER_BLACKLIST.add(ExtensionHeaderNames.SCHEME.text(), EMPTY_STRING);
HTTP_TO_HTTP3_HEADER_BLACKLIST.add(ExtensionHeaderNames.PATH.text(), EMPTY_STRING);
}
/**
* <a href="https://tools.ietf.org/html/rfc7540#section-8.1.2.3">[RFC 7540], 8.1.2.3</a> states the path must not
* be empty, and instead should be {@code /}.
*/
private static final AsciiString EMPTY_REQUEST_PATH = AsciiString.cached("/");
private HttpConversionUtil() {
}
/**
* Provides the HTTP header extensions used to carry HTTP/3 information in HTTP objects
*/
public enum ExtensionHeaderNames {
/**
* HTTP extension header which will identify the stream id from the HTTP/3 event(s) responsible for
* generating an {@code HttpObject}
* <p>
* {@code "x-http3-stream-id"}
*/
STREAM_ID("x-http3-stream-id"),
/**
* HTTP extension header which will identify the scheme pseudo header from the HTTP/3 event(s) responsible for
* generating an {@code HttpObject}
* <p>
* {@code "x-http3-scheme"}
*/
SCHEME("x-http3-scheme"),
/**
* HTTP extension header which will identify the path pseudo header from the HTTP/3 event(s) responsible for
* generating an {@code HttpObject}
* <p>
* {@code "x-http3-path"}
*/
PATH("x-http3-path"),
/**
* HTTP extension header which will identify the stream id used to create this stream in an HTTP/3 push promise
* frame
* <p>
* {@code "x-http3-stream-promise-id"}
*/
STREAM_PROMISE_ID("x-http3-stream-promise-id");
private final AsciiString text;
ExtensionHeaderNames(String text) {
this.text = AsciiString.cached(text);
}
public AsciiString text() {
return text;
}
}
/**
* Apply HTTP/3 rules while translating status code to {@link HttpResponseStatus}
*
* @param status The status from an HTTP/3 frame
* @return The HTTP/1.x status
* @throws Http3Exception If there is a problem translating from HTTP/3 to HTTP/1.x
Source
Frequently Asked Questions
What is the HttpConversionUtil class?
HttpConversionUtil is a class in the netty codebase, defined in codec-http3/src/main/java/io/netty/handler/codec/http3/HttpConversionUtil.java.
Where is HttpConversionUtil defined?
HttpConversionUtil is defined in codec-http3/src/main/java/io/netty/handler/codec/http3/HttpConversionUtil.java at line 68.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free