Top Fields Constructors Methods
io.undertow

public Class UndertowOptions

extends Object
Class Inheritance
Imports
org.xnio.Option

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
public static final Option<String>
AJP_ALLOWED_REQUEST_ATTRIBUTES_PATTERN

The AJP protocol itself supports the passing of arbitrary request attributes.

public static final Option<Boolean>
ALLOW_ENCODED_SLASH

Deprecated - this option was interpreted improperly.
If a request comes in with encoded / characters (i.e. %2F), will these be decoded.
public static final Option<Boolean>
public static final Option<Boolean>
ALLOW_UNKNOWN_PROTOCOLS

If unknown protocols should be allowed.

public static final Option<Boolean>
ALWAYS_SET_DATE

If this is true then a Date header will be added to all responses.

public static final Option<Boolean>
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.

public static final Option<Boolean>
BUFFER_PIPELINED_DATA

If we should buffer pipelined requests.

public static final Option<Boolean>
DECODE_SLASH

If a request comes in with encoded / characters (i.e. %2F), will these be decoded.

public static final Option<Boolean>
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).

public static final int
public static final int
public static final int
public static final int
public static final int
public static final long
DEFAULT_MAX_ENTITY_SIZE

We do not have a default upload limit

public static final int
DEFAULT_MAX_HEADER_SIZE

The default size we allow for the HTTP header.

public static final int
public static final int
public static final int
public static final int
DEFAULT_READ_TIMEOUT

The default read timeout to be used by read operations that absolutely require a timeout.

public static final int
public static final Option<Boolean>
ENABLE_CONNECTOR_STATISTICS

Deprecated
If connector level statistics should be enabled.
public static final Option<Boolean>
ENABLE_HTTP2

If we should attempt to use HTTP2 for HTTPS connections.

public static final Option<Boolean>
ENABLE_SPDY

Deprecated
If we should attempt to use SPDY for HTTPS connections.
public static final Option<Boolean>
ENABLE_STATISTICS

If connector level statistics should be enabled.

public static final Option<String>
ENDPOINT_IDENTIFICATION_ALGORITHM

The endpoint identification algorithm, the empty string can be used to set none.

public static final Option<Integer>
HTTP2_HUFFMAN_CACHE_SIZE

Undertow keeps a LRU cache of common huffman encodings.

public static final Option<Integer>
HTTP2_PADDING_SIZE

The maximum amount of padding to send in a HTTP/2 frame.

public static final Option<Boolean>
HTTP2_SETTINGS_ENABLE_PUSH

If push should be enabled for this connection.

public static final Option<Integer>
HTTP2_SETTINGS_HEADER_TABLE_SIZE

The size of the header table that is used in the encoder

public static final int
public static final Option<Integer>
public static final Option<Integer>
HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS

The maximum number of concurrent http2 streams.

public static final Option<Integer>
public static final Option<Integer>
HTTP2_SETTINGS_MAX_HEADER_LIST_SIZE

Deprecated
Deprecated, as it is effectively a duplicate of MAX_HEADER_SIZE
public static final Option<Integer>
HTTP_HEADERS_CACHE_SIZE

The maximum number of headers that are cached per connection.

public static final Option<Integer>
IDLE_TIMEOUT

The idle timeout in milliseconds after which the channel will be closed.

public static final Option<Integer>
MAX_AJP_PACKET_SIZE

The maximum AJP packet size, default is 8192

public static final Option<Integer>
MAX_BUFFERED_REQUEST_SIZE

Maximum size of a buffered request, in bytes

Requests 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.

public static final Option<Integer>
MAX_CACHED_HEADER_SIZE

The maximum size of a header name+value combo that is cached in the per connection cache.

public static final Option<Integer>
MAX_CONCURRENT_REQUESTS_PER_CONNECTION

The maximum number of concurrent requests that will be processed at a time.

public static final Option<Integer>
MAX_COOKIES

The maximum number of cookies that will be parsed.

public static final Option<Long>
MAX_ENTITY_SIZE

The default maximum size of the HTTP entity body.

public static final Option<Integer>
MAX_HEADER_SIZE

The maximum size in bytes of a http request header.

public static final Option<Integer>
MAX_HEADERS

The maximum number of headers that will be parsed.

public static final Option<Integer>
MAX_PARAMETERS

The maximum number of parameters that will be parsed.

public static final Option<Integer>
MAX_QUEUED_READ_BUFFERS

The maximum number of buffers that will be used before reads are paused in framed protocols.

public static final Option<Integer>
MAX_RST_FRAMES_PER_WINDOW

Maximum number of HTTP2 RST frames received allowed during a time window.

public static final Option<Long>
MULTIPART_MAX_ENTITY_SIZE

The default maximum size of the HTTP entity body when using the mutiltipart parser.

public static final Option<Integer>
NO_REQUEST_TIMEOUT

The amount of time the connection can be idle with no current requests before it is closed;

public static final Option<Integer>
QUEUED_FRAMES_HIGH_WATER_MARK

The maximum numbers of frames that can be queued before reads are suspended.

public static final Option<Integer>
QUEUED_FRAMES_LOW_WATER_MARK

The point at which reads will resume again after hitting the high water mark Defaults to 10

public static final Option<Boolean>
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

public static final Option<Integer>
REQUEST_PARSE_TIMEOUT

The maximum allowed time of reading HTTP request in milliseconds.

public static final Option<Boolean>
REQUIRE_HOST_HTTP11

If this is true then HTTP/1.1 requests will be failed if no host header is present.

public static final Option<Integer>
RST_FRAMES_TIME_WINDOW

Window of time per which the number of HTTP2 RST received frames is measured, in milliseconds.

public static final Option<Integer>
SHUTDOWN_TIMEOUT

The server shutdown timeout in milliseconds after which the executor will be forcefully shut down interrupting tasks which are still executing.

public static final Option<String>
SSL_SNI_HOSTNAME

This option forces io.undertow.protocols.ssl.UndertowXnioSsl to use a specific name as the javax.net.ssl.SNIHostName for a client connection.

public static final Option<Boolean>
SSL_USER_CIPHER_SUITES_ORDER

If the SSLEngine should prefer the servers cipher version.

public static final Option<Boolean>
TRACK_ACTIVE_REQUESTS

If active request tracking should be enabled.

public static final Option<String>
URL_CHARSET

If this is true then the parser will decode the URL and query parameters using the selected character encoding (UTF-8 by default).

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AJP_ALLOWED_REQUEST_ATTRIBUTES_PATTERNback to summary
public static final Option<String> AJP_ALLOWED_REQUEST_ATTRIBUTES_PATTERN

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.

ALLOW_ENCODED_SLASHback to summary
public static final Option<Boolean> 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 false

See CVE-2007-0450

See Also
DECODE_SLASH
ALLOW_UNESCAPED_CHARACTERS_IN_URLback to summary
public static final Option<Boolean> ALLOW_UNESCAPED_CHARACTERS_IN_URL
ALLOW_UNKNOWN_PROTOCOLSback to summary
public static final Option<Boolean> 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 400 Defaults to false

ALWAYS_SET_DATEback to summary
public static final Option<Boolean> 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

ALWAYS_SET_KEEP_ALIVEback to summary
public static final Option<Boolean> 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

BUFFER_PIPELINED_DATAback to summary
public static final Option<Boolean> BUFFER_PIPELINED_DATA

If we should buffer pipelined requests. Defaults to false.

DECODE_SLASHback to summary
public static final Option<Boolean> 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_SLASH is ignored. Should default to true

See CVE-2007-0450

DECODE_URLback to summary
public static final Option<Boolean> 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_HTTP2_SETTINGS_MAX_CONCURRENT_STREAMSback to summary
public static final int DEFAULT_HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS
DEFAULT_HTTP_HEADERS_CACHE_SIZEback to summary
public static final int DEFAULT_HTTP_HEADERS_CACHE_SIZE
DEFAULT_MAX_BUFFERED_REQUEST_SIZEback to summary
public static final int DEFAULT_MAX_BUFFERED_REQUEST_SIZE
DEFAULT_MAX_CACHED_HEADER_SIZEback to summary
public static final int DEFAULT_MAX_CACHED_HEADER_SIZE
DEFAULT_MAX_COOKIESback to summary
public static final int DEFAULT_MAX_COOKIES
DEFAULT_MAX_ENTITY_SIZEback to summary
public static final long DEFAULT_MAX_ENTITY_SIZE

We do not have a default upload limit

DEFAULT_MAX_HEADER_SIZEback to summary
public static final int DEFAULT_MAX_HEADER_SIZE

The default size we allow for the HTTP header.

DEFAULT_MAX_HEADERSback to summary
public static final int DEFAULT_MAX_HEADERS
DEFAULT_MAX_PARAMETERSback to summary
public static final int DEFAULT_MAX_PARAMETERS
DEFAULT_MAX_RST_FRAMES_PER_WINDOWback to summary
public static final int DEFAULT_MAX_RST_FRAMES_PER_WINDOW

Default value of MAX_RST_FRAMES_PER_WINDOW option.

DEFAULT_READ_TIMEOUTback to summary
public static final int DEFAULT_READ_TIMEOUT

The 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.

DEFAULT_RST_FRAMES_TIME_WINDOWback to summary
public static final int DEFAULT_RST_FRAMES_TIME_WINDOW

Default value of RST_FRAMES_TIME_WINDOW option.

ENABLE_CONNECTOR_STATISTICSback to summary
public static final Option<Boolean> ENABLE_CONNECTOR_STATISTICS

Deprecated

If connector level statistics should be enabled. This has a slight performance impact, but allows statistics such as bytes sent/recevied to be monitored.

Annotations
@Deprecated
ENABLE_HTTP2back to summary
public static final Option<Boolean> ENABLE_HTTP2

If we should attempt to use HTTP2 for HTTPS connections.

ENABLE_SPDYback to summary
public static final Option<Boolean> ENABLE_SPDY

Deprecated

If we should attempt to use SPDY for HTTPS connections. SPDY is no longer supported, use HTTP/2 instead

Annotations
@Deprecated
ENABLE_STATISTICSback to summary
public static final Option<Boolean> 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.

ENDPOINT_IDENTIFICATION_ALGORITHMback to summary
public static final Option<String> ENDPOINT_IDENTIFICATION_ALGORITHM

The endpoint identification algorithm, the empty string can be used to set none.

See Also
javax.net.ssl.SSLParameters#setEndpointIdentificationAlgorithm(String)
HTTP2_HUFFMAN_CACHE_SIZEback to summary
public static final Option<Integer> 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.

HTTP2_PADDING_SIZEback to summary
public static final Option<Integer> HTTP2_PADDING_SIZE

The maximum amount of padding to send in a HTTP/2 frame. Actual amount will be randomly determined, defaults to Zero.

HTTP2_SETTINGS_ENABLE_PUSHback to summary
public static final Option<Boolean> HTTP2_SETTINGS_ENABLE_PUSH

If push should be enabled for this connection.

HTTP2_SETTINGS_HEADER_TABLE_SIZEback to summary
public static final Option<Integer> HTTP2_SETTINGS_HEADER_TABLE_SIZE

The size of the header table that is used in the encoder

HTTP2_SETTINGS_HEADER_TABLE_SIZE_DEFAULTback to summary
public static final int HTTP2_SETTINGS_HEADER_TABLE_SIZE_DEFAULT
HTTP2_SETTINGS_INITIAL_WINDOW_SIZEback to summary
public static final Option<Integer> HTTP2_SETTINGS_INITIAL_WINDOW_SIZE
HTTP2_SETTINGS_MAX_CONCURRENT_STREAMSback to summary
public static final Option<Integer> HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS

The maximum number of concurrent http2 streams.

HTTP2_SETTINGS_MAX_FRAME_SIZEback to summary
public static final Option<Integer> HTTP2_SETTINGS_MAX_FRAME_SIZE
HTTP2_SETTINGS_MAX_HEADER_LIST_SIZEback to summary
public static final Option<Integer> HTTP2_SETTINGS_MAX_HEADER_LIST_SIZE

Deprecated

Deprecated, as it is effectively a duplicate of MAX_HEADER_SIZE

Annotations
@Deprecated
See Also
MAX_HEADER_SIZE
HTTP_HEADERS_CACHE_SIZEback to summary
public static final Option<Integer> HTTP_HEADERS_CACHE_SIZE

The maximum number of headers that are cached per connection. Defaults to 15. If this is set to zero the cache is disabled.

IDLE_TIMEOUTback to summary
public static final Option<Integer> 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.

MAX_AJP_PACKET_SIZEback to summary
public static final Option<Integer> MAX_AJP_PACKET_SIZE

The maximum AJP packet size, default is 8192

MAX_BUFFERED_REQUEST_SIZEback to summary
public static final Option<Integer> MAX_BUFFERED_REQUEST_SIZE

Maximum size of a buffered request, in bytes

Requests 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.

MAX_CACHED_HEADER_SIZEback to summary
public static final Option<Integer> MAX_CACHED_HEADER_SIZE

The maximum size of a header name+value combo that is cached in the per connection cache. Defaults to 150

MAX_CONCURRENT_REQUESTS_PER_CONNECTIONback to summary
public static final Option<Integer> 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.

MAX_COOKIESback to summary
public static final Option<Integer> MAX_COOKIES

The maximum number of cookies that will be parsed. This is used to protect against hash vulnerabilities.

Defaults to 200

MAX_ENTITY_SIZEback to summary
public static final Option<Long> MAX_ENTITY_SIZE

The default maximum size of the HTTP entity body.

MAX_HEADER_SIZEback to summary
public static final Option<Integer> MAX_HEADER_SIZE

The maximum size in bytes of a http request header.

MAX_HEADERSback to summary
public static final Option<Integer> MAX_HEADERS

The maximum number of headers that will be parsed. This is used to protect against hash vulnerabilities.

Defaults to 200

MAX_PARAMETERSback to summary
public static final Option<Integer> 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 1000

MAX_QUEUED_READ_BUFFERSback to summary
public static final Option<Integer> MAX_QUEUED_READ_BUFFERS

The maximum number of buffers that will be used before reads are paused in framed protocols. Defaults to 10

MAX_RST_FRAMES_PER_WINDOWback to summary
public static final Option<Integer> 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 during RST_FRAMES_TIME_WINDOW milliseconds, the server will send a GO_AWAY frame with error code 11 (ENHANCE_YOUR_CALM) and it will close the connection.

MULTIPART_MAX_ENTITY_SIZEback to summary
public static final Option<Long> MULTIPART_MAX_ENTITY_SIZE

The default maximum size of the HTTP entity body when using the mutiltipart parser. Generall this will be larger than MAX_ENTITY_SIZE. If this is not specified it will be the same as MAX_ENTITY_SIZE.

NO_REQUEST_TIMEOUTback to summary
public static final Option<Integer> NO_REQUEST_TIMEOUT

The amount of time the connection can be idle with no current requests before it is closed;

QUEUED_FRAMES_HIGH_WATER_MARKback to summary
public static final Option<Integer> 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 until QUEUED_FRAMES_LOW_WATER_MARK is hit. Defaults to 50

QUEUED_FRAMES_LOW_WATER_MARKback to summary
public static final Option<Integer> QUEUED_FRAMES_LOW_WATER_MARK

The point at which reads will resume again after hitting the high water mark Defaults to 10

RECORD_REQUEST_START_TIMEback to summary
public static final Option<Boolean> 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

REQUEST_PARSE_TIMEOUTback to summary
public static final Option<Integer> REQUEST_PARSE_TIMEOUT

The maximum allowed time of reading HTTP request in milliseconds. -1 or missing value disables this functionality.

REQUIRE_HOST_HTTP11back to summary
public static final Option<Boolean> REQUIRE_HOST_HTTP11

If this is true then HTTP/1.1 requests will be failed if no host header is present.

RST_FRAMES_TIME_WINDOWback to summary
public static final Option<Integer> 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 than MAX_RST_FRAMES_PER_WINDOW is 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.

SHUTDOWN_TIMEOUTback to summary
public static final Option<Integer> 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.

SSL_SNI_HOSTNAMEback to summary
public static final Option<String> SSL_SNI_HOSTNAME

This option forces io.undertow.protocols.ssl.UndertowXnioSsl to use a specific name as the javax.net.ssl.SNIHostName for 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.

SSL_USER_CIPHER_SUITES_ORDERback to summary
public static final Option<Boolean> SSL_USER_CIPHER_SUITES_ORDER

If the SSLEngine should prefer the servers cipher version. Only applicable on JDK8+.

TRACK_ACTIVE_REQUESTSback to summary
public static final Option<Boolean> 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.

URL_CHARSETback to summary
public static final Option<String> URL_CHARSET

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.

Constructor Detail

UndertowOptionsback to summary
private UndertowOptions()