Commit cf444b4f 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.

Conflicts:
	bin/varnishtest/tests/t02000.vtc
	bin/varnishtest/tests/t02005.vtc
	include/tbl/params.h
parent 0e1e4ea9
......@@ -85,6 +85,7 @@ h2_local_settings(struct h2_settings *h2s)
h2s->l = cache_param->h2_##l;
#include "tbl/h2_settings.h"
#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
process p1 -stop
# shell {cat ${tmpdir}/vlog}
# SETTINGS with default initial window size
shell -match {1001 H2TxHdr c \[000006040000000000\]} {
shell -match {1001 H2TxHdr c \[00000c040000000000\]} {
cat ${tmpdir}/vlog
}
......
......@@ -27,7 +27,7 @@ varnish v1 -cliok "param.set debug +syncvsl"
logexpect l1 -v v1 -g raw {
expect * 1001 ReqAcct "80 7 87 106 8 114"
expect * 1000 ReqAcct "45 8 53 63 28 91"
expect * 1000 ReqAcct "45 8 53 63 34 97"
} -start
client c1 {
......
......@@ -90,6 +90,7 @@ H2_SETTING( // rfc7540,l,2150,2157
H2CE_PROTOCOL_ERROR
)
#ifndef H2_SETTINGS_PARAM_ONLY
H2_SETTING( // rfc7540,l,2159,2167
MAX_HEADER_LIST_SIZE,
max_header_list_size,
......@@ -99,6 +100,7 @@ H2_SETTING( // rfc7540,l,2159,2167
0xffffffff,
0
)
#endif
#undef H2_SETTING
/*lint -restore */
......@@ -703,11 +703,13 @@ PARAM(
/* flags */ 0,
/* s-text */
"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 "
"ends the HTTP request.\n"
"This is a limit on all bytes up to the double blank line which "
"ends the HTTP request. "
"The memory for the request is allocated from the client workspace "
"(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.",
/* l-text */ "",
/* func */ NULL
)
......@@ -1899,7 +1901,9 @@ PARAM(
/* units */ "bytes",
/* flags */ 0,
/* s-text */
"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.",
/* l-text */ "",
/* func */ NULL
)
......
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