Merge pull request #1733 from nghttp2/nghttpx-no-rfc7540-priorities
nghttpx: Disable RFC 7540 priorities
This commit is contained in:
commit
534284477e
|
@ -1911,6 +1911,10 @@ void fill_default_config(Config *config) {
|
||||||
nghttp2_option_set_no_recv_client_magic(upstreamconf.option, 1);
|
nghttp2_option_set_no_recv_client_magic(upstreamconf.option, 1);
|
||||||
nghttp2_option_set_max_deflate_dynamic_table_size(
|
nghttp2_option_set_max_deflate_dynamic_table_size(
|
||||||
upstreamconf.option, upstreamconf.encoder_dynamic_table_size);
|
upstreamconf.option, upstreamconf.encoder_dynamic_table_size);
|
||||||
|
nghttp2_option_set_server_fallback_rfc7540_priorities(upstreamconf.option,
|
||||||
|
1);
|
||||||
|
nghttp2_option_set_builtin_recv_extension_type(upstreamconf.option,
|
||||||
|
NGHTTP2_PRIORITY_UPDATE);
|
||||||
|
|
||||||
// For API endpoint, we enable automatic window update. This is
|
// For API endpoint, we enable automatic window update. This is
|
||||||
// because we are a sink.
|
// because we are a sink.
|
||||||
|
|
|
@ -1693,14 +1693,17 @@ int Http2Session::connection_made() {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::array<nghttp2_settings_entry, 4> entry;
|
std::array<nghttp2_settings_entry, 5> entry;
|
||||||
size_t nentry = 2;
|
size_t nentry = 3;
|
||||||
entry[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS;
|
entry[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS;
|
||||||
entry[0].value = http2conf.downstream.max_concurrent_streams;
|
entry[0].value = http2conf.downstream.max_concurrent_streams;
|
||||||
|
|
||||||
entry[1].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE;
|
entry[1].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE;
|
||||||
entry[1].value = http2conf.downstream.window_size;
|
entry[1].value = http2conf.downstream.window_size;
|
||||||
|
|
||||||
|
entry[2].settings_id = NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES;
|
||||||
|
entry[2].value = 1;
|
||||||
|
|
||||||
if (http2conf.no_server_push || config->http2_proxy) {
|
if (http2conf.no_server_push || config->http2_proxy) {
|
||||||
entry[nentry].settings_id = NGHTTP2_SETTINGS_ENABLE_PUSH;
|
entry[nentry].settings_id = NGHTTP2_SETTINGS_ENABLE_PUSH;
|
||||||
entry[nentry].value = 0;
|
entry[nentry].value = 0;
|
||||||
|
|
|
@ -1045,8 +1045,8 @@ Http2Upstream::Http2Upstream(ClientHandler *handler)
|
||||||
flow_control_ = true;
|
flow_control_ = true;
|
||||||
|
|
||||||
// TODO Maybe call from outside?
|
// TODO Maybe call from outside?
|
||||||
std::array<nghttp2_settings_entry, 4> entry;
|
std::array<nghttp2_settings_entry, 5> entry;
|
||||||
size_t nentry = 2;
|
size_t nentry = 3;
|
||||||
|
|
||||||
entry[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS;
|
entry[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS;
|
||||||
entry[0].value = http2conf.upstream.max_concurrent_streams;
|
entry[0].value = http2conf.upstream.max_concurrent_streams;
|
||||||
|
@ -1058,6 +1058,9 @@ Http2Upstream::Http2Upstream(ClientHandler *handler)
|
||||||
entry[1].value = http2conf.upstream.window_size;
|
entry[1].value = http2conf.upstream.window_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
entry[2].settings_id = NGHTTP2_SETTINGS_NO_RFC7540_PRIORITIES;
|
||||||
|
entry[2].value = 1;
|
||||||
|
|
||||||
if (!config->http2_proxy) {
|
if (!config->http2_proxy) {
|
||||||
entry[nentry].settings_id = NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL;
|
entry[nentry].settings_id = NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL;
|
||||||
entry[nentry].value = 1;
|
entry[nentry].value = 1;
|
||||||
|
|
Loading…
Reference in New Issue