0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Add options to control h2's SETTINGS_HEADER_TABLE_SIZE

This commit is contained in:
Loïc Hoguin 2018-04-25 16:55:52 +02:00
parent bc79529b4d
commit 8f4adf437c
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
4 changed files with 147 additions and 16 deletions

View file

@ -21,6 +21,8 @@ opts() :: #{
enable_connect_protocol => boolean(),
env => cowboy_middleware:env(),
inactivity_timeout => timeout(),
max_decode_table_size => non_neg_integer(),
max_encode_table_size => non_neg_integer(),
middlewares => [module()],
preface_timeout => timeout(),
shutdown_timeout => timeout(),
@ -45,6 +47,7 @@ connection_type (supervisor)::
enable_connect_protocol (false)::
Whether to enable the extended CONNECT method to allow
protocols like Websocket to be used over an HTTP/2 stream.
This option is experimental and disabled by default.
env (#{})::
Middleware environment.
@ -52,6 +55,16 @@ env (#{})::
inactivity_timeout (300000)::
Time in ms with nothing received at all before Cowboy closes the connection.
max_decode_table_size (4096)::
Maximum header table size used by the decoder. This is the value advertised
to the client. The client can then choose a header table size equal or lower
to the advertised value.
max_encode_table_size (4096)::
Maximum header table size used by the encoder. The server will compare this
value to what the client advertises and choose the smallest one as the
encoder's header table size.
middlewares ([cowboy_router, cowboy_handler])::
Middlewares to run for every request.
@ -66,6 +79,8 @@ stream_handlers ([cowboy_stream_h])::
== Changelog
* *2.4*: Add the options `max_decode_table_size` and `max_encode_table_size`.
* *2.4*: Add the experimental option `enable_connect_protocol`.
* *2.0*: Protocol introduced.
== See also