Commit 118ed09d authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Allow disabling padding

parent 5b58b4ac
......@@ -1338,8 +1338,7 @@ typedef enum {
* payload. If this option is set to N, padding is added to frame
* payload so that its payload length is divisible by N. For DATA
* frame, due to flow control, padding is not always added according
* to this alignment. The option value must be greater than or equal
* to 8.
* to this alignment. Specifying 0 to this option disables padding.
*/
NGHTTP2_OPT_PADDING_BOUNDARY = 1 << 3
} nghttp2_opt;
......
......@@ -224,8 +224,7 @@ static int nghttp2_session_new(nghttp2_session **session_ptr,
(*session_ptr)->opt_flags |=
NGHTTP2_OPTMASK_NO_AUTO_CONNECTION_WINDOW_UPDATE;
}
if((opt_set_mask & NGHTTP2_OPT_PADDING_BOUNDARY) &&
opt_set->padding_boundary >= 8) {
if(opt_set_mask & NGHTTP2_OPT_PADDING_BOUNDARY) {
(*session_ptr)->padding_boundary = opt_set->padding_boundary;
} else {
(*session_ptr)->padding_boundary = NGHTTP2_PADDING_BOUNDARY;
......
......@@ -1711,7 +1711,8 @@ void print_help(std::ostream& out)
<< " -c, --header-table-size=<N>\n"
<< " Specify decoder header table size.\n"
<< " -b, --padding=<BOUNDARY>\n"
<< " Padding boundary for frame payload.\n"
<< " Padding boundary for frame payload. Specify\n"
<< " 0 to disable padding.\n"
<< " --color Force colored log output.\n"
<< " --continuation Send large header to test CONTINUATION.\n"
<< std::endl;
......
......@@ -116,7 +116,8 @@ void print_help(std::ostream& out)
<< " PATH and PUSH_PATHs are relative to document\n"
<< " root. See --htdocs option.\n"
<< " -b, --padding=<BOUNDARY>\n"
<< " Padding boundary for frame payload.\n"
<< " Padding boundary for frame payload. Specify\n"
<< " 0 to disable padding.\n"
<< " -h, --help Print this help.\n"
<< std::endl;
}
......
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