From: Eric Covener Date: Wed, 25 Mar 2020 01:52:48 +0000 (+0000) Subject: PR63437: don't clobber the scheme in r->uri with MergeSlashes X-Git-Tag: 2.5.0-alpha2-ci-test-only~1564 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1acda06095b64a99e69eca4782bb2a94bf369a8c;p=thirdparty%2Fapache%2Fhttpd.git PR63437: don't clobber the scheme in r->uri with MergeSlashes git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1875604 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 4254b39606c..52160716236 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.1 + *) core: When a scheme (protocol) appears in the request URL, don't merge + the two slashes that separate the scheme from the authority (hostname). + PR 63437. [Eric Covener] + *) mod_proxy_http: Fix random memory-corruption in case of an error while reading a response from the backend. PR 64234 [Ruediger Pluem, Barnim Dzwillo ] diff --git a/server/request.c b/server/request.c index a448fa7af5f..dd59ebf2c1d 100644 --- a/server/request.c +++ b/server/request.c @@ -194,7 +194,9 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r) ap_getparents(r->uri); /* OK --- shrinking transformations... */ if (sconf->merge_slashes != AP_CORE_CONFIG_OFF) { - ap_no2slash(r->uri); + int offset = r->parsed_uri.scheme ? strlen(r->parsed_uri.scheme) + 3 /* '://' */ + : 0; + ap_no2slash(&r->uri[offset]); if (r->parsed_uri.path) { ap_no2slash(r->parsed_uri.path); }