The compression level to use.
The compression level to use. If passed the default value (-1) then it will use
TextualContentCompressor
which will compress text-like content-types with the default compression level (6).
Otherwise, use the Netty HttpContentCompressor
for all content-types with specified
compression level.
Enables decompression of http content bodies.
Enable HTTP/2
Enable HTTP/2
this will override whatever has been set in the toggle.
Enable the collection of HTTP specific metrics.
Enable the collection of HTTP specific metrics. See http.filter.StatsFilter.
For HTTP1*, configures the max size of headers For HTTP2, sets the MAX_HEADER_LIST_SIZE setting which is the maximum number of uncompressed bytes of header name/values.
For HTTP1*, configures the max size of headers For HTTP2, sets the MAX_HEADER_LIST_SIZE setting which is the maximum number of uncompressed bytes of header name/values. These may be set independently via the .configured API.
Configures the maximum initial http line length the server is willing to accept.
Configures the maximum request size this server can receive.
By default finagle-http automatically sends 100-CONTINUE responses to inbound requests which set the 'Expect: 100-Continue' header.
By default finagle-http automatically sends 100-CONTINUE responses to inbound
requests which set the 'Expect: 100-Continue' header. Streaming servers will
always return 100-CONTINUE. Non-streaming servers will compare the
content-length header to the configured limit (see: withMaxRequestSize
)
and send either a 100-CONTINUE or 413-REQUEST ENTITY TOO LARGE as
appropriate. This method disables those automatic responses.
Disabling automatic continues is only supported in com.twitter.finagle.Http.Netty4Impl servers.
,Servers operating as proxies should disable automatic responses in order to allow origin servers to determine whether the expectation can be met.
Disable HTTP/2
Disable HTTP/2
this will override whatever has been set in the toggle.
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
This method configures fixedLengthStreamedAfter
limit, which effectively turns on
streaming (think withStreaming(true)
). The fixedLengthStreamedAfter
, however, disables
streaming for sufficiently small messages of known fixed length.
If Content-Length
of a message does not exceed fixedLengthStreamedAfter
it is
buffered and its content is available through Request.content or
Request.contentString.
Messages without Content-Length
header are always streamed regardless of their
actual content length and the fixedLengthStreamedAfter
value.
Request.isChunked should be used to determine whether a message is streamed
(isChunked == true
) or buffered (isChunked == false
).
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
Streaming allows applications to work with HTTP messages that have large (or infinite) content bodies.
If enabled
is set to true
, the message content is available through a
com.twitter.io.Reader, which gives the application a handle to the byte stream.
If enabled
is set to false
, the entire message content is buffered up to
maximum allowed message size.