]> granicus.if.org Git - apache/commitdiff
suppress h2 in upgrade header
authorStefan Eissing <icing@apache.org>
Wed, 20 Apr 2016 09:22:37 +0000 (09:22 +0000)
committerStefan Eissing <icing@apache.org>
Wed, 20 Apr 2016 09:22:37 +0000 (09:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740075 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/protocol.c

diff --git a/CHANGES b/CHANGES
index 07cc585a8f313d7a7855d737a8df9bf2f31954eb..ea49b840254638209ff2709361f834910e24a31c 100644 (file)
--- 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.
      
index b38083ed199c44e03999a9507e5180490f5304f1..9f60f1f255a233f6798abee2174840388ee5ba2c 100644 (file)
@@ -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;
                 }