From 6ebf7e66f3dc099b26ecdb332e5d0886f2782f10 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Wed, 20 Apr 2016 09:22:37 +0000 Subject: [PATCH] suppress h2 in upgrade header git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740075 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ server/protocol.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 07cc585a8f..ea49b84025 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 b38083ed19..9f60f1f255 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; } -- 2.40.0