public final class HttpRequestDecoderSpec extends Object
HttpServerCodec
(or more precisely the HttpServerCodec.HttpServerRequestDecoder
).
Defaults are accessible as constants DEFAULT_MAX_INITIAL_LINE_LENGTH
, DEFAULT_MAX_HEADER_SIZE
and DEFAULT_MAX_CHUNK_SIZE
.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INITIAL_BUFFER_SIZE |
static int |
DEFAULT_MAX_CHUNK_SIZE |
static int |
DEFAULT_MAX_HEADER_SIZE |
static int |
DEFAULT_MAX_INITIAL_LINE_LENGTH |
static boolean |
DEFAULT_VALIDATE_HEADERS |
Constructor and Description |
---|
HttpRequestDecoderSpec() |
Modifier and Type | Method and Description |
---|---|
HttpRequestDecoderSpec |
initialBufferSize(int value)
Configure the initial buffer size for HTTP request decoding.
|
HttpRequestDecoderSpec |
maxChunkSize(int value)
Configure the maximum chunk size that can be decoded for the HTTP request.
|
HttpRequestDecoderSpec |
maxHeaderSize(int value)
Configure the maximum header size that can be decoded for the HTTP request.
|
HttpRequestDecoderSpec |
maxInitialLineLength(int value)
Configure the maximum length that can be decoded for the HTTP request's initial
line.
|
HttpRequestDecoderSpec |
validateHeaders(boolean validate)
Configure whether or not to validate headers when decoding requests.
|
public static final int DEFAULT_MAX_INITIAL_LINE_LENGTH
public static final int DEFAULT_MAX_HEADER_SIZE
public static final int DEFAULT_MAX_CHUNK_SIZE
public static final boolean DEFAULT_VALIDATE_HEADERS
public static final int DEFAULT_INITIAL_BUFFER_SIZE
public HttpRequestDecoderSpec maxInitialLineLength(int value)
DEFAULT_MAX_INITIAL_LINE_LENGTH
.value
- the value for the maximum initial line length (strictly positive)public HttpRequestDecoderSpec maxHeaderSize(int value)
DEFAULT_MAX_HEADER_SIZE
.value
- the value for the maximum header size (strictly positive)public HttpRequestDecoderSpec maxChunkSize(int value)
DEFAULT_MAX_CHUNK_SIZE
.value
- the value for the maximum chunk size (strictly positive)public HttpRequestDecoderSpec validateHeaders(boolean validate)
validate
- true to validate headers, false otherwisepublic HttpRequestDecoderSpec initialBufferSize(int value)
DEFAULT_INITIAL_BUFFER_SIZE
.value
- the initial buffer size to use (strictly positive)