Package reactor.netty.http.client
Class HttpResponseDecoderSpec
java.lang.Object
reactor.netty.http.HttpDecoderSpec<HttpResponseDecoderSpec>
reactor.netty.http.client.HttpResponseDecoderSpec
- All Implemented Interfaces:
Supplier<HttpResponseDecoderSpec>
A configuration builder to fine tune the
HttpClientCodec
(or more precisely the HttpClientCodec.Decoder).
Defaults are accessible as constants:
- Author:
- Violeta Georgieva
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final intThe maximum length of the content of the HTTP/2.0 clear-text upgrade request.static final intThe default maximum allowed size of the decompression buffer, in bytes, used when decompressing a compressed HTTP response body.static final booleanFields inherited from class reactor.netty.http.HttpDecoderSpec
allowDuplicateContentLengths, allowPartialChunks, DEFAULT_ALLOW_DUPLICATE_CONTENT_LENGTHS, DEFAULT_ALLOW_PARTIAL_CHUNKS, DEFAULT_INITIAL_BUFFER_SIZE, DEFAULT_MAX_CHUNK_SIZE, DEFAULT_MAX_HEADER_SIZE, DEFAULT_MAX_INITIAL_LINE_LENGTH, DEFAULT_VALIDATE_HEADERS, h2cMaxContentLength, initialBufferSize, maxChunkSize, maxHeaderSize, maxInitialLineLength, validateHeaders -
Method Summary
Modifier and TypeMethodDescriptionbooleanfailOnMissingResponse(boolean failOnMissingResponse) Configure whether to throw an exception on a channel inactive in case there was a missing response.get()inthashCode()intReturn the configured maximum allowed size, in bytes, of the buffer used to decompress a compressed HTTP response body.maxDecompressionBufferSize(int value) Configure the maximum allowed size, in bytes, of the buffer used to decompress a compressed HTTP response body (applies togzip/deflate/br/zstdwhencompressionis enabled).parseHttpAfterConnectRequest(boolean parseHttpAfterConnectRequest) Configure whether the HTTP decoding will continue even after HTTP CONNECT.Methods inherited from class reactor.netty.http.HttpDecoderSpec
allowDuplicateContentLengths, allowDuplicateContentLengths, allowPartialChunks, allowPartialChunks, h2cMaxContentLength, h2cMaxContentLength, initialBufferSize, initialBufferSize, maxChunkSize, maxChunkSize, maxHeaderSize, maxHeaderSize, maxInitialLineLength, maxInitialLineLength, validateHeaders, validateHeaders
-
Field Details
-
DEFAULT_FAIL_ON_MISSING_RESPONSE
public static final boolean DEFAULT_FAIL_ON_MISSING_RESPONSE- See Also:
-
DEFAULT_PARSE_HTTP_AFTER_CONNECT_REQUEST
public static final boolean DEFAULT_PARSE_HTTP_AFTER_CONNECT_REQUEST- See Also:
-
DEFAULT_H2C_MAX_CONTENT_LENGTH
public static final int DEFAULT_H2C_MAX_CONTENT_LENGTHThe maximum length of the content of the HTTP/2.0 clear-text upgrade request. By default, the client will allow an upgrade request with up to 65536 as the maximum length of the aggregated content.- See Also:
-
DEFAULT_MAX_DECOMPRESSION_BUFFER_SIZE
public static final int DEFAULT_MAX_DECOMPRESSION_BUFFER_SIZEThe default maximum allowed size of the decompression buffer, in bytes, used when decompressing a compressed HTTP response body.0means that the maximum size is not limited.- See Also:
-
-
Method Details
-
get
-
failOnMissingResponse
Configure whether to throw an exception on a channel inactive in case there was a missing response.- Parameters:
failOnMissingResponse- true - throw an exception on a channel inactive in case there was a missing response, otherwise false- Returns:
- this option builder for further configuration
-
parseHttpAfterConnectRequest
Configure whether the HTTP decoding will continue even after HTTP CONNECT.- Parameters:
parseHttpAfterConnectRequest- true to continue HTTP decoding, otherwise false- Returns:
- this option builder for further configuration
-
maxDecompressionBufferSize
Configure the maximum allowed size, in bytes, of the buffer used to decompress a compressed HTTP response body (applies togzip/deflate/br/zstdwhencompressionis enabled). When the decompression buffer reaches this size and cannot be expanded further, aio.netty.handler.codec.compression.DecompressionExceptionis thrown. Defaults toDEFAULT_MAX_DECOMPRESSION_BUFFER_SIZE(0), which means that the maximum size is not limited.- Parameters:
value- the maximum allowed size of the decompression buffer, in bytes;0means the maximum size is not limited (non-negative)- Returns:
- this option builder for further configuration
- Since:
- 1.0.53
-
maxDecompressionBufferSize
public int maxDecompressionBufferSize()Return the configured maximum allowed size, in bytes, of the buffer used to decompress a compressed HTTP response body.0means the maximum size is not limited.- Returns:
- the configured maximum allowed size of the decompression buffer, in bytes
- Since:
- 1.0.53
-
equals
- Overrides:
equalsin classHttpDecoderSpec<HttpResponseDecoderSpec>
-
hashCode
public int hashCode()- Overrides:
hashCodein classHttpDecoderSpec<HttpResponseDecoderSpec>
-