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