Interface H1ProtocolConfig
- All Superinterfaces:
HttpProtocolConfig
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringalpnId()TLS Application-Layer Protocol Negotiation (ALPN) Protocol ID of the protocol this configuration is for.intValue used to calculate an exponential moving average of the encoded size of the HTTP start line and header fields for a guess for future buffer allocations.intMaximum length (size in bytes) of an individual HTTP header field or trailer field to parse.intMaximum number of pipelined HTTP requests to queue up.intMaximum length (size in bytes) of the HTTP start line for an HTTP message.default intGet the maximum total allowed length (size in bytes) of the HTTP start line and all header fields, or all trailer fields.Additional exceptions for HTTP/1.1 specification.intValue used to calculate an exponential moving average of the encoded size of the HTTP trailer fields for a guess for future buffer allocations.Methods inherited from interface io.servicetalk.http.api.HttpProtocolConfig
headersFactory
-
Method Details
-
alpnId
Description copied from interface:HttpProtocolConfigTLS Application-Layer Protocol Negotiation (ALPN) Protocol ID of the protocol this configuration is for.- Specified by:
alpnIdin interfaceHttpProtocolConfig- Returns:
- string representation of ALPN Identification Sequence
- See Also:
-
maxPipelinedRequests
int maxPipelinedRequests()Maximum number of pipelined HTTP requests to queue up.Anything above this value will be rejected,
1means pipelining is disabled and requests/responses are processed sequentially.Note:
reserved connectionswill not be restricted by this setting.- Returns:
- maximum number of pipelined HTTP requests to queue up
-
maxStartLineLength
int maxStartLineLength()Maximum length (size in bytes) of the HTTP start line for an HTTP message.Note: a decoder will close the connection with
TooLongFrameExceptionif the start line exceeds this value, including CRLF delimiter at the end.- Returns:
- maximum size of the HTTP start line for an HTTP message
-
maxTotalHeaderFieldsLength
default int maxTotalHeaderFieldsLength()Get the maximum total allowed length (size in bytes) of the HTTP start line and all header fields, or all trailer fields.This limit protects against memory exhaustion attacks where an attacker sends many small headers or trailers that individually pass
field validationbut collectively consume excessive memory.Note: a decoder will close the connection with
TooLongFrameExceptionif the total headers or trailers block size exceeds this value, including CRLF delimiter at the end of each line.This is an HTTP/1.x equivalent of HTTP/2's SETTINGS_MAX_HEADER_LIST_SIZE that can be configured via
Http2Settings.maxHeaderListSize()forH2ProtocolConfig.initialSettings().- Returns:
- maximum total allowed length (size in bytes) of the start line and all headers, or all trailers
- See Also:
-
maxHeaderFieldLength
int maxHeaderFieldLength()Maximum length (size in bytes) of an individual HTTP header field or trailer field to parse.Note: a decoder will close the connection with
TooLongFrameExceptionif the length of a header or trailer field exceeds this value, including CRLF delimiter at the end.- Returns:
- maximum length (size in bytes) of an individual HTTP header field or trailer field to parse
- See Also:
-
headersEncodedSizeEstimate
int headersEncodedSizeEstimate()Value used to calculate an exponential moving average of the encoded size of the HTTP start line and header fields for a guess for future buffer allocations.- Returns:
- value used to calculate an exponential moving average of the encoded size of the HTTP start line and header fields
-
trailersEncodedSizeEstimate
int trailersEncodedSizeEstimate()Value used to calculate an exponential moving average of the encoded size of the HTTP trailer fields for a guess for future buffer allocations.- Returns:
- value used to calculate an exponential moving average of the encoded size of the HTTP trailer fields
-
specExceptions
H1SpecExceptions specExceptions()Additional exceptions for HTTP/1.1 specification.- Returns:
- exceptions for HTTP/1.1 specification
-