summaryrefslogtreecommitdiffstats
path: root/modules/http2/h2_session.c
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2016-11-23 19:13:06 +0100
committerStefan Eissing <icing@apache.org>2016-11-23 19:13:06 +0100
commitfcdeaaec90b73818809f69d4bf68347d7536a9bb (patch)
tree6371cbf50cf17d73680479f0b57b75aa612ee5ce /modules/http2/h2_session.c
parentupdate after backport (diff)
downloadapache2-fcdeaaec90b73818809f69d4bf68347d7536a9bb.tar.xz
apache2-fcdeaaec90b73818809f69d4bf68347d7536a9bb.zip
mod_http2: new directove H2EarlyPushes for enabled 103 interim responses
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1771015 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/http2/h2_session.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c
index 7225201bfc..0a29a3b18c 100644
--- a/modules/http2/h2_session.c
+++ b/modules/http2/h2_session.c
@@ -1501,6 +1501,14 @@ static apr_status_t on_stream_headers(h2_session *session, h2_stream *stream,
apr_itoa(stream->pool, connFlowOut));
}
+ if (headers->status == 103
+ && !h2_config_geti(session->config, H2_CONF_EARLY_HINTS)) {
+ /* suppress sending this to the client, it might have triggered
+ * pushes and served its purpose nevertheless */
+ rv = 0;
+ goto leave;
+ }
+
ngh = h2_util_ngheader_make_res(stream->pool, headers->status, hout);
rv = nghttp2_submit_response(session->ngh2, stream->id,
ngh->nv, ngh->nvlen, pprovider);