You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2020/03/25 01:52:49 UTC

svn commit: r1875604 - in /httpd/httpd/trunk: CHANGES server/request.c

Author: covener
Date: Wed Mar 25 01:52:48 2020
New Revision: 1875604

URL: http://svn.apache.org/viewvc?rev=1875604&view=rev
Log:
PR63437: don't clobber the scheme in r->uri with MergeSlashes


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/server/request.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1875604&r1=1875603&r2=1875604&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Mar 25 01:52:48 2020
@@ -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 <dz...@strato.de>]

Modified: httpd/httpd/trunk/server/request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/request.c?rev=1875604&r1=1875603&r2=1875604&view=diff
==============================================================================
--- httpd/httpd/trunk/server/request.c (original)
+++ httpd/httpd/trunk/server/request.c Wed Mar 25 01:52:48 2020
@@ -194,7 +194,9 @@ AP_DECLARE(int) ap_process_request_inter
 
     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);
         }