src: Remove redundant SETTINGS_ENABLE_PUSH from server side

This commit is contained in:
Tatsuhiro Tsujikawa 2014-02-16 16:05:26 +09:00
parent 88607f09e5
commit 1fd5fdd54a
2 changed files with 2 additions and 7 deletions

View File

@ -368,11 +368,9 @@ int Http2Handler::on_connect()
return r; return r;
} }
nghttp2_settings_entry entry[4]; nghttp2_settings_entry entry[4];
size_t niv = 2; size_t niv = 1;
entry[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS; entry[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS;
entry[0].value = 100; entry[0].value = 100;
entry[1].settings_id = NGHTTP2_SETTINGS_ENABLE_PUSH;
entry[1].value = 0;
if(sessions_->get_config()->header_table_size >= 0) { if(sessions_->get_config()->header_table_size >= 0) {
entry[niv].settings_id = NGHTTP2_SETTINGS_HEADER_TABLE_SIZE; entry[niv].settings_id = NGHTTP2_SETTINGS_HEADER_TABLE_SIZE;
entry[niv].value = sessions_->get_config()->header_table_size; entry[niv].value = sessions_->get_config()->header_table_size;

View File

@ -537,16 +537,13 @@ Http2Upstream::Http2Upstream(ClientHandler *handler)
flow_control_ = true; flow_control_ = true;
// TODO Maybe call from outside? // TODO Maybe call from outside?
nghttp2_settings_entry entry[3]; nghttp2_settings_entry entry[2];
entry[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS; entry[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS;
entry[0].value = get_config()->http2_max_concurrent_streams; entry[0].value = get_config()->http2_max_concurrent_streams;
entry[1].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE; entry[1].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE;
entry[1].value = (1 << get_config()->http2_upstream_window_bits) - 1; entry[1].value = (1 << get_config()->http2_upstream_window_bits) - 1;
entry[2].settings_id = NGHTTP2_SETTINGS_ENABLE_PUSH;
entry[2].value = 0;
rv = nghttp2_submit_settings(session_, NGHTTP2_FLAG_NONE, rv = nghttp2_submit_settings(session_, NGHTTP2_FLAG_NONE,
entry, entry,
sizeof(entry)/sizeof(nghttp2_settings_entry)); sizeof(entry)/sizeof(nghttp2_settings_entry));