]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
PR63437: don't clobber the scheme in r->uri with MergeSlashes
authorEric Covener <covener@apache.org>
Wed, 25 Mar 2020 01:52:48 +0000 (01:52 +0000)
committerEric Covener <covener@apache.org>
Wed, 25 Mar 2020 01:52:48 +0000 (01:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1875604 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/request.c

diff --git a/CHANGES b/CHANGES
index 4254b39606cf0572c888e795f772d84d4d2e34df..521607162360f9536d6daa79a749504031336616 100644 (file)
--- 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 <dzwillo@strato.de>]
index a448fa7af5f4d2f98e50b7942bf0ac5372af5896..dd59ebf2c1d4bca5b9e05c93409b6ce92a960f15 100644 (file)
@@ -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);
         }