From 41208950ecf3758273385b4dc737856e4844dc01 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 2 Nov 2013 16:59:59 +0900 Subject: [PATCH] nghttpx: Disable push in HTTP/2 backend --- src/shrpx_spdy_session.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/shrpx_spdy_session.cc b/src/shrpx_spdy_session.cc index d61dbf8e..ff4a68f5 100644 --- a/src/shrpx_spdy_session.cc +++ b/src/shrpx_spdy_session.cc @@ -1152,12 +1152,14 @@ int SpdySession::on_connect() &val, sizeof(val)); assert(rv == 0); - nghttp2_settings_entry entry[2]; - entry[0].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS; - entry[0].value = get_config()->spdy_max_concurrent_streams; + nghttp2_settings_entry entry[3]; + entry[0].settings_id = NGHTTP2_SETTINGS_ENABLE_PUSH; + entry[0].value = 0; + entry[1].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS; + entry[1].value = get_config()->spdy_max_concurrent_streams; - entry[1].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE; - entry[1].value = get_initial_window_size(); + entry[2].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE; + entry[2].value = get_initial_window_size(); rv = nghttp2_submit_settings(session_, NGHTTP2_FLAG_NONE, entry, sizeof(entry)/sizeof(nghttp2_settings_entry));