| Modifier and Type | Class and Description |
|---|---|
| public static enum | HttpConversionUtil.
Provides the HTTP header extensions used to carry HTTP/2 information in HTTP objects |
| private static class | HttpConversionUtil.
Utility which translates HTTP/2 headers to HTTP/1 headers. |
| Modifier and Type | Field and Description |
|---|---|
| private static final AsciiString | EMPTY_REQUEST_PATH
[RFC 7540], 8.1.2.3 states the path must not
be empty, and instead should be |
| private static final CharSequenceMap | HTTP_TO_HTTP2_HEADER_BLACKLIST
The set of headers that should not be directly copied when converting headers from HTTP to HTTP/2. |
| public static final HttpMethod | OUT_OF_MESSAGE_SEQUENCE_METHOD
This will be the method used for |
| public static final String | OUT_OF_MESSAGE_SEQUENCE_PATH
This will be the path used for |
| public static final HttpResponseStatus | OUT_OF_MESSAGE_SEQUENCE_RETURN_CODE
This will be the status code used for |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | addHttp2ToHttpHeaders(int
The stream associated with streamId, Http2Headers sourceHeaders.The HTTP/2 headers to convert. inputHeaders, FullHttpMessage The object which will contain the resulting HTTP/1.x headers. destinationMessage, boolean true to add to trailing headers. false to add to initial headers.Translate and add HTTP/2 headers to HTTP/1.x headers. |
| public static void | addHttp2ToHttpHeaders(int
The stream associated with streamId, Http2Headers sourceHeaders.The HTTP/2 headers to convert. inputHeaders, HttpHeaders The object which will contain the resulting HTTP/1.x headers.. outputHeaders, HttpVersion What HTTP/1.x version httpVersion, boolean outputHeaders should be treated as when doing the conversion.true if outputHeaders should be treated as trailing headers.
false otherwise.true if the outputHeaders will be used in a request message.
false for response message.Translate and add HTTP/2 headers to HTTP/1.x headers. |
| private static String | |
| public static HttpResponseStatus | Returns: The HTTP/1.x statusThe status from an HTTP/2 frame status)Apply HTTP/2 rules while translating status code to |
| pack-priv static void | |
| private static void | |
| private static void | |
| public static FullHttpRequest | Returns: A new request object which represents headers/dataThe stream associated with the request streamId, Http2Headers The initial set of HTTP/2 headers to create the request with http2Headers, ByteBufAllocator The alloc, boolean ByteBufAllocator to use to generate the content of the message
Create a new object to contain the request data |
| public static FullHttpRequest | Returns: A new request object which represents headers/dataThe stream associated with the request streamId, Http2Headers The initial set of HTTP/2 headers to create the request with http2Headers, ByteBuf ByteBuf content to put in FullHttpRequest
Create a new object to contain the request data |
| public static FullHttpResponse | Returns: A new response object which represents headers/dataThe stream associated with the response streamId, Http2Headers The initial set of HTTP/2 headers to create the response with http2Headers, ByteBufAllocator The alloc, boolean ByteBufAllocator to use to generate the content of the message
Create a new object to contain the response data |
| public static FullHttpResponse | Returns: A new response object which represents headers/dataThe stream associated with the response streamId, Http2Headers The initial set of HTTP/2 headers to create the response with http2Headers, ByteBuf ByteBuf content to put in FullHttpResponse
Create a new object to contain the response data |
| public static Http2Headers | toHttp2Headers(HttpMessage in, boolean validateHeaders)
Converts the given HTTP/1.x headers into HTTP/2 headers. |
| public static Http2Headers | |
| public static void | |
| private static void | toHttp2HeadersFilterTE(Map.
An entry whose name is entry,HttpHeaderNames#TE.the resulting HTTP/2 headers. out)Filter the |
| private static AsciiString | |
| public static HttpRequest | Returns: A new request object which represents headers for a chunked requestThe stream associated with the request streamId, Http2Headers The initial set of HTTP/2 headers to create the request with http2Headers, boolean
Create a new object to contain the request data. |
| public static HttpResponse | Returns: A new response object which represents headers for a chunked responseThe stream associated with the response streamId, final Http2Headers The initial set of HTTP/2 headers to create the response with http2Headers, final boolean
Create a new object to contain the response data. |
| private static CharSequenceMap |
| EMPTY_REQUEST_PATH | back to summary |
|---|---|
| private static final AsciiString EMPTY_REQUEST_PATH [RFC 7540], 8.1.2.3 states the path must not
be empty, and instead should be | |
| HTTP_TO_HTTP2_HEADER_BLACKLIST | back to summary |
|---|---|
| private static final CharSequenceMap<AsciiString> HTTP_TO_HTTP2_HEADER_BLACKLIST The set of headers that should not be directly copied when converting headers from HTTP to HTTP/2. | |
| OUT_OF_MESSAGE_SEQUENCE_METHOD | back to summary |
|---|---|
| public static final HttpMethod OUT_OF_MESSAGE_SEQUENCE_METHOD This will be the method used for | |
| OUT_OF_MESSAGE_SEQUENCE_PATH | back to summary |
|---|---|
| public static final String OUT_OF_MESSAGE_SEQUENCE_PATH This will be the path used for | |
| OUT_OF_MESSAGE_SEQUENCE_RETURN_CODE | back to summary |
|---|---|
| public static final HttpResponseStatus OUT_OF_MESSAGE_SEQUENCE_RETURN_CODE This will be the status code used for | |
| HttpConversionUtil | back to summary |
|---|---|
| private HttpConversionUtil() | |
| addHttp2ToHttpHeaders | back to summary |
|---|---|
| public static void addHttp2ToHttpHeaders(int streamId, Http2Headers inputHeaders, FullHttpMessage destinationMessage, boolean addToTrailer) throws Http2Exception Translate and add HTTP/2 headers to HTTP/1.x headers.
| |
| addHttp2ToHttpHeaders | back to summary |
|---|---|
| public static void addHttp2ToHttpHeaders(int streamId, Http2Headers inputHeaders, HttpHeaders outputHeaders, HttpVersion httpVersion, boolean isTrailer, boolean isRequest) throws Http2Exception Translate and add HTTP/2 headers to HTTP/1.x headers.
| |
| extractPath | back to summary |
|---|---|
| private static String extractPath(CharSequence method, Http2Headers headers) | |
| parseStatus | back to summary |
|---|---|
| public static HttpResponseStatus parseStatus(CharSequence status) throws Http2Exception Apply HTTP/2 rules while translating status code to
| |
| setHttp2Authority | back to summary |
|---|---|
| pack-priv static void setHttp2Authority(String authority, Http2Headers out) | |
| setHttp2Scheme | back to summary |
|---|---|
| private static void setHttp2Scheme(HttpHeaders in, Http2Headers out) | |
| setHttp2Scheme | back to summary |
|---|---|
| private static void setHttp2Scheme(HttpHeaders in, URI uri, Http2Headers out) | |
| toFullHttpRequest | back to summary |
|---|---|
| public static FullHttpRequest toFullHttpRequest(int streamId, Http2Headers http2Headers, ByteBufAllocator alloc, boolean validateHttpHeaders) throws Http2Exception Create a new object to contain the request data
| |
| toFullHttpRequest | back to summary |
|---|---|
| public static FullHttpRequest toFullHttpRequest(int streamId, Http2Headers http2Headers, ByteBuf content, boolean validateHttpHeaders) throws Http2Exception Create a new object to contain the request data
| |
| toFullHttpResponse | back to summary |
|---|---|
| public static FullHttpResponse toFullHttpResponse(int streamId, Http2Headers http2Headers, ByteBufAllocator alloc, boolean validateHttpHeaders) throws Http2Exception Create a new object to contain the response data
| |
| toFullHttpResponse | back to summary |
|---|---|
| public static FullHttpResponse toFullHttpResponse(int streamId, Http2Headers http2Headers, ByteBuf content, boolean validateHttpHeaders) throws Http2Exception Create a new object to contain the response data
| |
| toHttp2Headers | back to summary |
|---|---|
| public static Http2Headers toHttp2Headers(HttpMessage in, boolean validateHeaders) Converts the given HTTP/1.x headers into HTTP/2 headers.
The following headers are only used if they can not be found in from the ExtensionHeaderNames#PATH is ignored and instead extracted from the Request-Line.
| |
| toHttp2Headers | back to summary |
|---|---|
| public static Http2Headers toHttp2Headers(HttpHeaders inHeaders, boolean validateHeaders) | |
| toHttp2Headers | back to summary |
|---|---|
| public static void toHttp2Headers(HttpHeaders inHeaders, Http2Headers out) | |
| toHttp2HeadersFilterTE | back to summary |
|---|---|
| private static void toHttp2HeadersFilterTE(Map. Filter the
| |
| toHttp2Path | back to summary |
|---|---|
| private static AsciiString toHttp2Path(URI uri) Generate an HTTP/2 {code :path} from a URI in accordance with rfc7230, 5.3. | |
| toHttpRequest | back to summary |
|---|---|
| public static HttpRequest toHttpRequest(int streamId, Http2Headers http2Headers, boolean validateHttpHeaders) throws Http2Exception Create a new object to contain the request data.
| |
| toHttpResponse | back to summary |
|---|---|
| public static HttpResponse toHttpResponse(final int streamId, final Http2Headers http2Headers, final boolean validateHttpHeaders) throws Http2Exception Create a new object to contain the response data.
| |
| toLowercaseMap | back to summary |
|---|---|
| private static CharSequenceMap | |
| Modifier and Type | Field and Description |
|---|---|
| public static final HttpConversionUtil. | PATH
HTTP extension header which will identify the path pseudo header from the HTTP/2 event(s) responsible for
generating an
|
| public static final HttpConversionUtil. | SCHEME
HTTP extension header which will identify the scheme pseudo header from the HTTP/2 event(s) responsible for
generating an
|
| public static final HttpConversionUtil. | STREAM_DEPENDENCY_ID
HTTP extension header which will identify the stream id which this stream is dependent on. |
| public static final HttpConversionUtil. | STREAM_ID
HTTP extension header which will identify the stream id from the HTTP/2 event(s) responsible for
generating an
|
| public static final HttpConversionUtil. | STREAM_PROMISE_ID
HTTP extension header which will identify the stream id used to create this stream in an HTTP/2 push promise frame
|
| public static final HttpConversionUtil. | STREAM_WEIGHT
HTTP extension header which will identify the weight (if non-default and the priority is not on the default
stream) of the associated HTTP/2 stream responsible responsible for generating an
|
| private final AsciiString |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public AsciiString | |
| public static HttpConversionUtil. | |
| public static HttpConversionUtil. |
| PATH | back to summary |
|---|---|
| public static final HttpConversionUtil. HTTP extension header which will identify the path pseudo header from the HTTP/2 event(s) responsible for
generating an
| |
| SCHEME | back to summary |
|---|---|
| public static final HttpConversionUtil. HTTP extension header which will identify the scheme pseudo header from the HTTP/2 event(s) responsible for
generating an
| |
| STREAM_DEPENDENCY_ID | back to summary |
|---|---|
| public static final HttpConversionUtil. HTTP extension header which will identify the stream id which this stream is dependent on. This stream will be a child node of the stream id associated with this header value.
| |
| STREAM_ID | back to summary |
|---|---|
| public static final HttpConversionUtil. HTTP extension header which will identify the stream id from the HTTP/2 event(s) responsible for
generating an
| |
| STREAM_PROMISE_ID | back to summary |
|---|---|
| public static final HttpConversionUtil. HTTP extension header which will identify the stream id used to create this stream in an HTTP/2 push promise frame
| |
| STREAM_WEIGHT | back to summary |
|---|---|
| public static final HttpConversionUtil. HTTP extension header which will identify the weight (if non-default and the priority is not on the default
stream) of the associated HTTP/2 stream responsible responsible for generating an
| |
| text | back to summary |
|---|---|
| private final AsciiString text | |
| ExtensionHeaderNames | back to summary |
|---|---|
| private ExtensionHeaderNames(String text) | |
| text | back to summary |
|---|---|
| public AsciiString text() | |
| valueOf | back to summary |
|---|---|
| public static HttpConversionUtil. | |
| values | back to summary |
|---|---|
| public static HttpConversionUtil. | |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpHeaders | |
| private static final CharSequenceMap | REQUEST_HEADER_TRANSLATIONS
Translations from HTTP/2 header name to the HTTP/1.x equivalent. |
| private static final CharSequenceMap | |
| private final int | |
| private final CharSequenceMap |
| Access | Constructor and Description |
|---|---|
| pack-priv | Http2ToHttpHeaderTranslator(int streamId, HttpHeaders
The HTTP/1.x headers object to store the results of the translation output, boolean if request)true, translates headers using the request translation map. Otherwise uses the
response translation map.Create a new instance |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void |
| output | back to summary |
|---|---|
| private final HttpHeaders output | |
| REQUEST_HEADER_TRANSLATIONS | back to summary |
|---|---|
| private static final CharSequenceMap<AsciiString> REQUEST_HEADER_TRANSLATIONS Translations from HTTP/2 header name to the HTTP/1.x equivalent. | |
| RESPONSE_HEADER_TRANSLATIONS | back to summary |
|---|---|
| private static final CharSequenceMap<AsciiString> RESPONSE_HEADER_TRANSLATIONS | |
| streamId | back to summary |
|---|---|
| private final int streamId | |
| translations | back to summary |
|---|---|
| private final CharSequenceMap<AsciiString> translations | |
| Http2ToHttpHeaderTranslator | back to summary |
|---|---|
| pack-priv Http2ToHttpHeaderTranslator(int streamId, HttpHeaders output, boolean request) Create a new instance
| |
| translateHeaders | back to summary |
|---|---|
| pack-priv void translateHeaders(Iterable<Map. | |