From: Stefan Eissing Date: Wed, 20 Apr 2016 11:39:30 +0000 (+0000) Subject: fixing h2 supress to inhibit other annnouncements in upgrade: header X-Git-Tag: 2.5.0-alpha~1723 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5cfcb0de07e54d354c0d0267dd164ed77a34c5d;p=apache fixing h2 supress to inhibit other annnouncements in upgrade: header git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740119 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 0c0f5a00da..2794db8f67 100644 --- a/CHANGES +++ b/CHANGES @@ -1,16 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 - *) mod_http2: r->protocol changed to "HTTP/2.0" (was "HTTP/2") as this will - give expected syntax in CGI's SERVER_PROTOCOL is more compatible with - existing major/minor handling. Fixes PR 59313. - *) core: explicitly exclude 'h2' from protocols announced via an Upgrade: header as commanded by http-wg. - *) mod_http2: disabling mmap for file buckets transport due to segmenation - faults when files change on the fly. - *) mod_http2: new "bucket beam" technology to transport buckets across threads without buffer copy. Delaying response start until flush or enough body data has been accumulated. [Stefan Eissing] diff --git a/server/protocol.c b/server/protocol.c index 9f60f1f255..b4c149f367 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -2021,7 +2021,10 @@ AP_DECLARE(apr_status_t) ap_get_protocol_upgrades(conn_rec *c, request_rec *r, const char *p = APR_ARRAY_IDX(conf->protocols, i, char *); /* special quirk for HTTP/2 which does not allow 'h2' to * be part of an Upgrade: header */ - if (strcmp(existing, p) && strcmp("h2", p)) { + if (!strcmp("h2", p)) { + continue; + } + else if (strcmp(existing, p)) { /* not the one we have and possible, add in this order */ APR_ARRAY_PUSH(upgrades, const char*) = p; }