Commit f1fb85fe authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

http2_session: Advertise http_req_size to clients

Since http_req_size was already established for this purpose, and is
now enforced for h2 traffic, it should naturally become the basis for
the MAX_HEADER_LIST_SIZE setting in the initial SETTINGS frame sent
to clients.

The h2_max_header_list_size parameter will grow a new purpose.
parent f7b31d65
...@@ -85,6 +85,7 @@ h2_local_settings(struct h2_settings *h2s) ...@@ -85,6 +85,7 @@ h2_local_settings(struct h2_settings *h2s)
h2s->l = cache_param->h2_##l; h2s->l = cache_param->h2_##l;
#include "tbl/h2_settings.h" #include "tbl/h2_settings.h"
#undef H2_SETTINGS_PARAM_ONLY #undef H2_SETTINGS_PARAM_ONLY
h2s->max_header_list_size = cache_param->http_req_size;
} }
/********************************************************************** /**********************************************************************
......
...@@ -69,7 +69,7 @@ varnish v1 -expect MEMPOOL.sess1.live == 0 ...@@ -69,7 +69,7 @@ varnish v1 -expect MEMPOOL.sess1.live == 0
process p1 -stop process p1 -stop
# shell {cat ${tmpdir}/vlog} # shell {cat ${tmpdir}/vlog}
# SETTINGS with default initial window size # SETTINGS with default initial window size
shell -match {1001 H2TxHdr c \[000006040000000000\]} { shell -match {1001 H2TxHdr c \[00000c040000000000\]} {
cat ${tmpdir}/vlog cat ${tmpdir}/vlog
} }
......
...@@ -32,7 +32,7 @@ varnish v1 -cliok "param.set debug +syncvsl" ...@@ -32,7 +32,7 @@ varnish v1 -cliok "param.set debug +syncvsl"
logexpect l1 -v v1 -g raw { logexpect l1 -v v1 -g raw {
expect * 1001 ReqAcct "80 7 87 78 8 86" expect * 1001 ReqAcct "80 7 87 78 8 86"
expect * 1000 ReqAcct "45 8 53 63 28 91" expect * 1000 ReqAcct "45 8 53 63 34 97"
} -start } -start
client c1 { client c1 {
......
...@@ -92,6 +92,7 @@ H2_SETTING( // rfc7540,l,2150,2157 ...@@ -92,6 +92,7 @@ H2_SETTING( // rfc7540,l,2150,2157
H2CE_PROTOCOL_ERROR H2CE_PROTOCOL_ERROR
) )
#ifndef H2_SETTINGS_PARAM_ONLY
H2_SETTING( // rfc7540,l,2159,2167 H2_SETTING( // rfc7540,l,2159,2167
MAX_HEADER_LIST_SIZE, MAX_HEADER_LIST_SIZE,
max_header_list_size, max_header_list_size,
...@@ -101,6 +102,7 @@ H2_SETTING( // rfc7540,l,2159,2167 ...@@ -101,6 +102,7 @@ H2_SETTING( // rfc7540,l,2159,2167
0xffffffff, 0xffffffff,
0 0
) )
#endif
#undef H2_SETTING #undef H2_SETTING
/*lint -restore */ /*lint -restore */
...@@ -605,11 +605,13 @@ PARAM_SIMPLE( ...@@ -605,11 +605,13 @@ PARAM_SIMPLE(
/* units */ "bytes", /* units */ "bytes",
/* descr */ /* descr */
"Maximum number of bytes of HTTP client request we will deal with. " "Maximum number of bytes of HTTP client request we will deal with. "
" This is a limit on all bytes up to the double blank line which " "This is a limit on all bytes up to the double blank line which "
"ends the HTTP request.\n" "ends the HTTP request. "
"The memory for the request is allocated from the client workspace " "The memory for the request is allocated from the client workspace "
"(param: workspace_client) and this parameter limits how much of " "(param: workspace_client) and this parameter limits how much of "
"that the request is allowed to take up." "that the request is allowed to take up.\n\n"
"For HTTP2 clients, it is advertised as MAX_HEADER_LIST_SIZE in "
"the initial SETTINGS frame."
) )
PARAM_SIMPLE( PARAM_SIMPLE(
...@@ -1290,7 +1292,9 @@ PARAM_SIMPLE( ...@@ -1290,7 +1292,9 @@ PARAM_SIMPLE(
/* def */ "4294967295b", /* def */ "4294967295b",
/* units */ "bytes", /* units */ "bytes",
/* descr */ /* descr */
"HTTP2 maximum size of an uncompressed header list." "HTTP2 maximum size of an uncompressed header list. This parameter "
"is not mapped to " H2_SETTING_NAME(MAX_HEADER_LIST_SIZE) " in the "
"initial SETTINGS frame, the http_req_size parameter is instead."
) )
#undef H2_SETTING_DESCR #undef H2_SETTING_DESCR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment