Class UndertowOptions
- Author:
- Stuart Douglas
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.xnio.Option<String>static final org.xnio.Option<Boolean>Deprecated.- this option was interpreted improperly.static final org.xnio.Option<Boolean>If this is true then Undertow will allow non-escaped equals characters in unquoted cookie values.static final org.xnio.Option<Boolean>Deprecated.static final org.xnio.Option<Boolean>static final org.xnio.Option<Boolean>If unknown protocols should be allowed.static final org.xnio.Option<Boolean>If this is true then a Date header will be added to all responses.static final org.xnio.Option<Boolean>If this is true then a Connection: keep-alive header will be added to responses, even when it is not strictly required by the specification.static final org.xnio.Option<Boolean>If we should buffer pipelined requests.static final org.xnio.Option<Boolean>If a request comes in with encoded / characters (i.e. %2F), will these be decoded.static final org.xnio.Option<Boolean>If this is true then the parser will decode the URL and query parameters using the selected character encoding (UTF-8 by default).static final BooleanDefault value ofALLOW_ENCODED_SLASHoption.static final booleanDeprecated.static final booleanDefault value ofALLOW_UNESCAPED_CHARACTERS_IN_URLoption.static final BooleanDefault value ofALLOW_UNKNOWN_PROTOCOLSoption.static final booleanDefault value ofALWAYS_SET_DATEoption.static final booleanDefault value ofALWAYS_SET_KEEP_ALIVEoption.static final booleanDefault value ofDECODE_URLoption.static final booleanDefault value ofENABLE_HTTP2option.static final booleanstatic final booleanDefault value ofENABLE_STATISTICSoption.static final intDeprecated, for removal: This API element is subject to removal in a future version.static final intDefault value ofHTTP2_PADDING_SIZEoption.static final intDefault value ofHTTP2_SETTINGS_INITIAL_WINDOW_SIZE.static final intstatic final intDefault value of request buffer.static final intDeprecated, for removal: This API element is subject to removal in a future version.static final intstatic final longDefault maximum upload size 2MBstatic final intThe default size we allow for the HTTP header.static final intstatic final intDefault value ofMAX_PARAMETERSoption.static final intDefault value ofMAX_QUEUED_READ_BUFFERSoption.static final intDefault value ofMAX_RST_FRAMES_PER_WINDOWoption.static final longProposed default minimum size for storing content in memory before persisting to disk.static final longDefault maximum multipart upload size 2MBstatic final intDefault value ofQUEUED_FRAMES_HIGH_WATER_MARKoption.static final org.xnio.Option<Integer>The AJP protocol itself supports the passing of arbitrary request attributes.static final intThe default read timeout to be used by read operations that absolutely require a timeout.static final intDefault value ofRST_FRAMES_TIME_WINDOWoption.static final booleanDefault value ofSSL_USER_CIPHER_SUITES_ORDERoption.static final StringDefault value ofURL_CHARSEToption.static final org.xnio.Option<Boolean>Deprecated, for removal: This API element is subject to removal in a future version.static final org.xnio.Option<Boolean>If we should attempt to use HTTP2 for HTTPS connections.static final org.xnio.Option<Boolean>If this is true then Undertow will enable RFC6265 compliant cookie validation for Set-Cookie header instead of legacy backward compatible behavior.static final org.xnio.Option<Boolean>Deprecated, for removal: This API element is subject to removal in a future version.static final org.xnio.Option<Boolean>If connector level statistics should be enabled.static final org.xnio.Option<String>The endpoint identification algorithm, the empty string can be used to set none.static final org.xnio.Option<Integer>Deprecated, for removal: This API element is subject to removal in a future version.static final org.xnio.Option<Integer>Undertow keeps a LRU cache of common huffman encodings.static final org.xnio.Option<Integer>The maximum amount of padding to send in a HTTP/2 frame.static final org.xnio.Option<Boolean>If push should be enabled for this connection.static final org.xnio.Option<Integer>The size of the header table that is used in the encoderstatic final intstatic final org.xnio.Option<Integer>Size of initial HTTP2 window.static final org.xnio.Option<Integer>The maximum number of concurrent http2 streams.static final org.xnio.Option<Integer>Max frame size for HTTP2.static final org.xnio.Option<Integer>Deprecated, for removal: This API element is subject to removal in a future version.static final org.xnio.Option<Integer>The idle timeout in milliseconds after which the channel will be closed.static final org.xnio.Option<Integer>The maximum AJP packet size, default is 8192.
UNIT: Bytes.static final org.xnio.Option<Integer>Maximum size of a buffered request, in bytesstatic final org.xnio.Option<Integer>Deprecated, for removal: This API element is subject to removal in a future version.static final org.xnio.Option<Integer>The maximum number of concurrent requests that will be processed at a time.static final org.xnio.Option<Integer>The maximum number of cookies that will be parsed.static final org.xnio.Option<Long>The default maximum size of the HTTP entity body.static final org.xnio.Option<Integer>The maximum size in bytes of a http request header.static final org.xnio.Option<Integer>The maximum number of headers that will be parsed.static final org.xnio.Option<Integer>The maximum number of parameters that will be parsed.static final org.xnio.Option<Integer>The maximum number of buffers that will be used before reads are paused in framed protocols.static final org.xnio.Option<Integer>Maximum number of HTTP2 RST frames received allowed during a time window.static final org.xnio.Option<Long>The minimum size in bytes for storing content in memory before persisting to disk.static final org.xnio.Option<Long>The default maximum size of the HTTP entity body when using the multipart parser.static final org.xnio.Option<Integer>The amount of time the connection can be idle with no current requests before it is closed;
UNIT: Milliseconds.static final org.xnio.Option<Integer>The maximum numbers of frames that can be queued before reads are suspended.static final org.xnio.Option<Integer>The point at which reads will resume again after hitting the high water mark Defaults to 10static final org.xnio.Option<Boolean>If this is true then Undertow will record the request start time, to allow for request time to be logged This has a small but measurable performance impact default is falsestatic final org.xnio.Option<Integer>The maximum allowed time of reading HTTP request in milliseconds.static final org.xnio.Option<Boolean>If this is true then HTTP/1.1 requests will be failed if no host header is present.static final org.xnio.Option<Integer>Window of time per which the number of HTTP2 RST received frames is measured, in milliseconds.static final org.xnio.Option<Integer>The server shutdown timeout in milliseconds after which the executor will be forcefully shut down interrupting tasks which are still executing.static final org.xnio.Option<String>This option forcesUndertowXnioSslto use a specific name as theSNIHostNamefor a client connection.static final org.xnio.Option<Boolean>If the SSLEngine should prefer the servers cipher version.static final org.xnio.Option<Boolean>If active request tracking should be enabled.static final org.xnio.Option<String>The character encoding to be used for the URL decoding of requests.static final org.xnio.Option<Integer>Configure a read timeout for a web socket, in milliseconds.static final org.xnio.Option<Integer>Configure a write timeout for a web socket, in milliseconds. -
Method Summary
-
Field Details
-
DEFAULT_READ_TIMEOUT
public static final int DEFAULT_READ_TIMEOUTThe default read timeout to be used by read operations that absolutely require a timeout. Used only when both READ_TIMEOUT and IDLE_TIMEOUT are not used.
UNIT: milliseconds.- See Also:
-
MAX_HEADER_SIZE
The maximum size in bytes of a http request header.
UNIT: Bytes. -
DEFAULT_MAX_HEADER_SIZE
public static final int DEFAULT_MAX_HEADER_SIZEThe default size we allow for the HTTP header.
UNIT: Bytes.- See Also:
-
MAX_ENTITY_SIZE
The default maximum size of the HTTP entity body.
UNIT: Bytes. -
MULTIPART_MAX_ENTITY_SIZE
The default maximum size of the HTTP entity body when using the multipart parser. Generally this will be larger thanMAX_ENTITY_SIZE. If this is not specified, it will default toDEFAULT_MULTIPART_MAX_ENTITY_SIZE. -
DEFAULT_MAX_ENTITY_SIZE
public static final long DEFAULT_MAX_ENTITY_SIZEDefault maximum upload size 2MB- See Also:
-
DEFAULT_MULTIPART_MAX_ENTITY_SIZE
public static final long DEFAULT_MULTIPART_MAX_ENTITY_SIZEDefault maximum multipart upload size 2MB- See Also:
-
BUFFER_PIPELINED_DATA
If we should buffer pipelined requests. Defaults to false. -
IDLE_TIMEOUT
The idle timeout in milliseconds after which the channel will be closed. If the underlying channel already has a read or write timeout set the smaller of the two values will be used for read/write timeouts.
UNIT: Milliseconds. -
REQUEST_PARSE_TIMEOUT
The maximum allowed time of reading HTTP request in milliseconds.-1or missing value disables this functionality.
UNIT: Milliseconds. -
NO_REQUEST_TIMEOUT
The amount of time the connection can be idle with no current requests before it is closed;
UNIT: Milliseconds. -
MAX_PARAMETERS
The maximum number of parameters that will be parsed. This is used to protect against hash vulnerabilities.This applies to both query parameters, and to POST data, but is not cumulative (i.e. you can potentially have max parameters * 2 total parameters).
Defaults to
DEFAULT_MAX_PARAMETERS -
DEFAULT_MAX_PARAMETERS
public static final int DEFAULT_MAX_PARAMETERSDefault value ofMAX_PARAMETERSoption.- See Also:
-
DEFAULT_MAX_HEADERS
public static final int DEFAULT_MAX_HEADERS- See Also:
-
MAX_HEADERS
The maximum number of headers that will be parsed. This is used to protect against hash vulnerabilities.Defaults to 200
-
DEFAULT_MAX_COOKIES
public static final int DEFAULT_MAX_COOKIES- See Also:
-
MAX_COOKIES
The maximum number of cookies that will be parsed. This is used to protect against hash vulnerabilities.Defaults to 200
-
DEFAULT_ALLOW_ENCODED_SLASH
Default value ofALLOW_ENCODED_SLASHoption. -
ALLOW_ENCODED_SLASH
Deprecated.- this option was interpreted improperly.If a request comes in with encoded / characters (i.e. %2F), will these be decoded.This can cause security problems if a front end proxy does not perform the same decoding, and as a result this is disabled by default.
Defaults to
DEFAULT_ALLOW_ENCODED_SLASHSee CVE-2007-0450
-
DECODE_SLASH
If a request comes in with encoded / characters (i.e. %2F), will these be decoded.This can cause security problems if a front end proxy does not perform the same decoding, and as a result this is disabled by default.
If this option is set explicitly, the
ALLOW_ENCODED_SLASHis ignored. Should default to trueSee CVE-2007-0450
-
DEFAULT_DECODE_URL
public static final boolean DEFAULT_DECODE_URLDefault value ofDECODE_URLoption.- See Also:
-
DECODE_URL
If this is true then the parser will decode the URL and query parameters using the selected character encoding (UTF-8 by default). If this is false they will not be decoded. This will allow a later handler to decode them into whatever charset is desired.Defaults to true.
-
DEFAULT_URL_CHARSET
Default value ofURL_CHARSEToption. -
URL_CHARSET
The character encoding to be used for the URL decoding of requests.Defaults to
DEFAULT_URL_CHARSET. -
DEFAULT_ALWAYS_SET_KEEP_ALIVE
public static final boolean DEFAULT_ALWAYS_SET_KEEP_ALIVEDefault value ofALWAYS_SET_KEEP_ALIVEoption.- See Also:
-
ALWAYS_SET_KEEP_ALIVE
If this is true then a Connection: keep-alive header will be added to responses, even when it is not strictly required by the specification.Defaults to true
-
DEFAULT_ALWAYS_SET_DATE
public static final boolean DEFAULT_ALWAYS_SET_DATEDefault value ofALWAYS_SET_DATEoption.- See Also:
-
ALWAYS_SET_DATE
If this is true then a Date header will be added to all responses. The HTTP spec says this header should be added to all responses, unless the server does not have an accurate clock.Defaults to true
-
MAX_BUFFERED_REQUEST_SIZE
Maximum size of a buffered request, in bytesRequests are not usually buffered, the most common case is when performing SSL renegotiation for a POST request, and the post data must be fully buffered in order to perform the renegotiation.
Defaults to 16384.
UNIT: Bytes. -
DEFAULT_MAX_BUFFERED_REQUEST_SIZE
public static final int DEFAULT_MAX_BUFFERED_REQUEST_SIZEDefault value of request buffer.
UNIT: Bytes.- See Also:
-
RECORD_REQUEST_START_TIME
If this is true then Undertow will record the request start time, to allow for request time to be logged This has a small but measurable performance impact default is false -
ALLOW_EQUALS_IN_COOKIE_VALUE
If this is true then Undertow will allow non-escaped equals characters in unquoted cookie values.Unquoted cookie values may not contain equals characters. If present the value ends before the equals sign. The remainder of the cookie value will be dropped.
default is false
-
ENABLE_RFC6265_COOKIE_VALIDATION
If this is true then Undertow will enable RFC6265 compliant cookie validation for Set-Cookie header instead of legacy backward compatible behavior. default is false -
DEFAULT_ENABLE_RFC6265_COOKIE_VALIDATION
public static final boolean DEFAULT_ENABLE_RFC6265_COOKIE_VALIDATION- See Also:
-
ENABLE_SPDY
Deprecated, for removal: This API element is subject to removal in a future version.If we should attempt to use SPDY for HTTPS connections. SPDY is no longer supported, use HTTP/2 instead -
DEFAULT_ENABLE_HTTP2
public static final boolean DEFAULT_ENABLE_HTTP2Default value ofENABLE_HTTP2option.- See Also:
-
ENABLE_HTTP2
If we should attempt to use HTTP2 for HTTPS connections.Defaults to
DEFAULT_ENABLE_HTTP2 -
DEFAULT_ENABLE_STATISTICS
public static final boolean DEFAULT_ENABLE_STATISTICSDefault value ofENABLE_STATISTICSoption.- See Also:
-
ENABLE_STATISTICS
If connector level statistics should be enabled. This has a slight performance impact, but allows statistics such as bytes sent/recevied to be monitored. If this is passed to the client then client statistics will be enabled.Defaults to
DEFAULT_ENABLE_STATISTICS -
ENABLE_CONNECTOR_STATISTICS
@Deprecated(forRemoval=true) public static final org.xnio.Option<Boolean> ENABLE_CONNECTOR_STATISTICSDeprecated, for removal: This API element is subject to removal in a future version.If connector level statistics should be enabled. This has a slight performance impact, but allows statistics such as bytes sent/recevied to be monitored. -
DEFAULT_ALLOW_UNKNOWN_PROTOCOLS
Default value ofALLOW_UNKNOWN_PROTOCOLSoption. -
ALLOW_UNKNOWN_PROTOCOLS
If unknown protocols should be allowed. The known protocols are: HTTP/0.9 HTTP/1.0 HTTP/1.1 HTTP/2.0 If this is false then requests that specify any other protocol will be rejected with a 400Defaults to
DEFAULT_ALLOW_UNKNOWN_PROTOCOLS -
HTTP2_SETTINGS_HEADER_TABLE_SIZE
The size of the header table that is used in the encoder -
HTTP2_SETTINGS_HEADER_TABLE_SIZE_DEFAULT
public static final int HTTP2_SETTINGS_HEADER_TABLE_SIZE_DEFAULT- See Also:
-
HTTP2_SETTINGS_ENABLE_PUSH
If push should be enabled for this connection. -
HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS
The maximum number of concurrent http2 streams. -
DEFAULT_HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS
public static final int DEFAULT_HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS- See Also:
-
HTTP2_SETTINGS_INITIAL_WINDOW_SIZE
Size of initial HTTP2 window.
UNIT: Bytes. -
DEFAULT_HTTP2_SETTINGS_INITIAL_WINDOW_SIZE
public static final int DEFAULT_HTTP2_SETTINGS_INITIAL_WINDOW_SIZEDefault value ofHTTP2_SETTINGS_INITIAL_WINDOW_SIZE.
UNIT: Bytes.- See Also:
-
HTTP2_SETTINGS_MAX_FRAME_SIZE
Max frame size for HTTP2.
UNIT: Bytes. -
HTTP2_SETTINGS_MAX_HEADER_LIST_SIZE
@Deprecated(forRemoval=true) public static final org.xnio.Option<Integer> HTTP2_SETTINGS_MAX_HEADER_LIST_SIZEDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, as it is effectively a duplicate of MAX_HEADER_SIZE- See Also:
-
DEFAULT_HTTP2_PADDING_SIZE
public static final int DEFAULT_HTTP2_PADDING_SIZEDefault value ofHTTP2_PADDING_SIZEoption.- See Also:
-
HTTP2_PADDING_SIZE
The maximum amount of padding to send in a HTTP/2 frame. Actual amount will be randomly determined, defaults to Zero.
UNIT: Bytes. -
HTTP2_HUFFMAN_CACHE_SIZE
Undertow keeps a LRU cache of common huffman encodings. This sets the maximum size, setting this to 0 will disable the caching. -
MAX_CONCURRENT_REQUESTS_PER_CONNECTION
The maximum number of concurrent requests that will be processed at a time. This differs from max concurrent streams in that it is not sent to the remote client. If the number of pending requests exceeds this number then requests will be queued, the difference between this and max concurrent streams determines the maximum number of requests that will be queued. Queued requests are processed by a priority queue, rather than a FIFO based queue, using HTTP2 stream priority. If this number is smaller than or equal to zero then max concurrent streams determines the maximum number of streams that can be run. -
DEFAULT_MAX_QUEUED_READ_BUFFERS
public static final int DEFAULT_MAX_QUEUED_READ_BUFFERSDefault value ofMAX_QUEUED_READ_BUFFERSoption.- See Also:
-
MAX_QUEUED_READ_BUFFERS
The maximum number of buffers that will be used before reads are paused in framed protocols.Defaults to
DEFAULT_MAX_QUEUED_READ_BUFFERS -
MAX_AJP_PACKET_SIZE
The maximum AJP packet size, default is 8192.
UNIT: Bytes. -
REQUIRE_HOST_HTTP11
If this is true then HTTP/1.1 requests will be failed if no host header is present. -
DEFAULT_MAX_CACHED_HEADER_SIZE
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
MAX_CACHED_HEADER_SIZE
Deprecated, for removal: This API element is subject to removal in a future version.The maximum size of a header name+value combo that is cached in the per connection cache. Defaults to 150 -
DEFAULT_HTTP_HEADERS_CACHE_SIZE
Deprecated, for removal: This API element is subject to removal in a future version.Default value ofHTTP_HEADERS_CACHE_SIZEoption.- See Also:
-
HTTP_HEADERS_CACHE_SIZE
Deprecated, for removal: This API element is subject to removal in a future version.The maximum number of headers that are cached per connection. If this is set to zero the cache is disabled.Defaults to
DEFAULT_HTTP_HEADERS_CACHE_SIZE -
DEFAULT_SSL_USER_CIPHER_SUITES_ORDER
public static final boolean DEFAULT_SSL_USER_CIPHER_SUITES_ORDERDefault value ofSSL_USER_CIPHER_SUITES_ORDERoption.- See Also:
-
SSL_USER_CIPHER_SUITES_ORDER
If the SSLEngine should prefer the servers cipher version. Only applicable on JDK8+. Defaults toDEFAULT_SSL_USER_CIPHER_SUITES_ORDER. -
SSL_SNI_HOSTNAME
This option forcesUndertowXnioSslto use a specific name as theSNIHostNamefor a client connection. If the option is not set, the URL hostname is used when available (for URLs that do not use the IP address). The option can be useful when connecting via IP but want to set a SNI hostname value. -
DEFAULT_ALLOW_UNESCAPED_CHARACTERS_IN_URL
public static final boolean DEFAULT_ALLOW_UNESCAPED_CHARACTERS_IN_URLDefault value ofALLOW_UNESCAPED_CHARACTERS_IN_URLoption.- See Also:
-
ALLOW_UNESCAPED_CHARACTERS_IN_URL
-
SHUTDOWN_TIMEOUT
The server shutdown timeout in milliseconds after which the executor will be forcefully shut down interrupting tasks which are still executing. There is no timeout by default.
UNIT: Milliseconds. -
ENDPOINT_IDENTIFICATION_ALGORITHM
The endpoint identification algorithm, the empty string can be used to set none. -
DEFAULT_QUEUED_FRAMES_HIGH_WATER_MARK
public static final int DEFAULT_QUEUED_FRAMES_HIGH_WATER_MARKDefault value ofQUEUED_FRAMES_HIGH_WATER_MARKoption.- See Also:
-
QUEUED_FRAMES_HIGH_WATER_MARK
The maximum numbers of frames that can be queued before reads are suspended. Once this number is hit then reads will not be resumed untilQUEUED_FRAMES_LOW_WATER_MARKis hit.Defaults to
DEFAULT_QUEUED_FRAMES_HIGH_WATER_MARK -
QUEUED_FRAMES_LOW_WATER_MARK
The point at which reads will resume again after hitting the high water mark Defaults to 10 -
DEFAULT_QUEUED_FRAMES_LOW_WATER_MARK
The AJP protocol itself supports the passing of arbitrary request attributes. The reverse proxy passes various information to the AJP connector using request attributes through AJP protocol. Unrecognised request attributes will be ignored unless the entire attribute name matches this regular expression. If not specified, the default value is null. -
AJP_ALLOWED_REQUEST_ATTRIBUTES_PATTERN
-
TRACK_ACTIVE_REQUESTS
If active request tracking should be enabled. This has a slight performance impact, and will only be honored if ENABLE_STATISTICS is also enabled. -
DEFAULT_RST_FRAMES_TIME_WINDOW
public static final int DEFAULT_RST_FRAMES_TIME_WINDOWDefault value ofRST_FRAMES_TIME_WINDOWoption.
UNIT: Milliseconds.- See Also:
-
DEFAULT_MAX_RST_FRAMES_PER_WINDOW
public static final int DEFAULT_MAX_RST_FRAMES_PER_WINDOWDefault value ofMAX_RST_FRAMES_PER_WINDOWoption.- See Also:
-
RST_FRAMES_TIME_WINDOW
Window of time per which the number of HTTP2 RST received frames is measured, in milliseconds. If a number of RST frames bigger thanMAX_RST_FRAMES_PER_WINDOWis received during this time window, the server will send a GO_AWAY frame with error code 11 (ENHANCE_YOUR_CALM) and it will close the connection.
UNIT: Milliseconds. -
MAX_RST_FRAMES_PER_WINDOW
Maximum number of HTTP2 RST frames received allowed during a time window. If a number of RST frames bigger than this limit is received duringRST_FRAMES_TIME_WINDOWmilliseconds, the server will send a GO_AWAY frame with error code 11 (ENHANCE_YOUR_CALM) and it will close the connection. -
DEFAULT_MEMORY_STORAGE_THRESHOLD
public static final long DEFAULT_MEMORY_STORAGE_THRESHOLDProposed default minimum size for storing content in memory before persisting to disk. The default value forMEMORY_STORAGE_THRESHOLDis 16 KB (16384 bytes).- See Also:
-
MEMORY_STORAGE_THRESHOLD
The minimum size in bytes for storing content in memory before persisting to disk. If the file content exceeds the specified file size threshold and the filename is not specified in the form, the content will be stored in memory as long as its size is less than or equal to this minimum size, after which it will be persisted to disk. -
WEB_SOCKETS_READ_TIMEOUT
Configure a read timeout for a web socket, in milliseconds. If its present it will overrideorg.xnio.Options.READ_TIMEOUT. If the given amount of time elapses without a successful read taking place, the socket's next read will throw aReadTimeoutException. -
WEB_SOCKETS_WRITE_TIMEOUT
Configure a write timeout for a web socket, in milliseconds. If its present it will overrideorg.xnio.Options.WRITE_TIMEOUT. If the given amount of time elapses without a successful write taking place, the socket's next write will throw aWriteTimeoutException. -
ALLOW_ID_LESS_MATRIX_PARAMETERS
Deprecated.Specify if matrix parameters without ID should be allowed or not. If set to 'true' '/test;param1,param2/next-path-segment' will be acceptable. (spec compliant '/test;PARAM_ID=param1,param2/next-path-segment') If this is not specified it will be the same asDEFAULT_ALLOW_ID_LESS_MATRIX_PARAMETERS. -
DEFAULT_ALLOW_ID_LESS_MATRIX_PARAMETERS
Deprecated.Default value of allow ID-less matrix parameters - false. We should comply with spec.- See Also:
-