From: Stefan Eissing Date: Fri, 18 Nov 2016 15:19:00 +0000 (+0000) Subject: mod_http2: limiting new PUSHes to GET only, preventing 103 responses when expecting... X-Git-Tag: 2.5.0-alpha~999 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44aec31369021f4a581ed954539711f641cc7732;p=thirdparty%2Fapache%2Fhttpd.git mod_http2: limiting new PUSHes to GET only, preventing 103 responses when expecting a 100 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1770395 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http2/h2_h2.c b/modules/http2/h2_h2.c index 8ca8ccb55f0..d1743386f8d 100644 --- a/modules/http2/h2_h2.c +++ b/modules/http2/h2_h2.c @@ -684,7 +684,8 @@ static int h2_h2_pre_close_conn(conn_rec *c) static void check_push(request_rec *r, const char *tag) { const h2_config *conf = h2_config_rget(r); - if (conf && conf->push_list && conf->push_list->nelts > 0) { + if (!r->expecting_100 + && conf && conf->push_list && conf->push_list->nelts > 0) { int i, old_status; const char *old_line; ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c index 5cb63d00b4d..7225201bfce 100644 --- a/modules/http2/h2_session.c +++ b/modules/http2/h2_session.c @@ -1473,6 +1473,8 @@ static apr_status_t on_stream_headers(h2_session *session, h2_stream *stream, */ if (!stream->initiated_on && !stream->has_response + && stream->request && stream->request->method + && !strcmp("GET", stream->request->method) && (headers->status < 400) && (headers->status != 304) && h2_session_push_enabled(session)) {