From: Stefan Eissing Date: Wed, 20 Apr 2016 09:22:37 +0000 (+0000) Subject: suppress h2 in upgrade header X-Git-Tag: 2.5.0-alpha~1728 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ebf7e66f3dc099b26ecdb332e5d0886f2782f10;p=thirdparty%2Fapache%2Fhttpd.git suppress h2 in upgrade header git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740075 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 07cc585a8f3..ea49b840254 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) 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. diff --git a/server/protocol.c b/server/protocol.c index b38083ed199..9f60f1f255a 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -2019,7 +2019,9 @@ AP_DECLARE(apr_status_t) ap_get_protocol_upgrades(conn_rec *c, request_rec *r, sizeof(char *)); for (i = 0; i < conf->protocols->nelts; i++) { const char *p = APR_ARRAY_IDX(conf->protocols, i, char *); - if (strcmp(existing, p)) { + /* special quirk for HTTP/2 which does not allow 'h2' to + * be part of an Upgrade: header */ + if (strcmp(existing, p) && strcmp("h2", p)) { /* not the one we have and possible, add in this order */ APR_ARRAY_PUSH(upgrades, const char*) = p; }