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
This commit is contained in:
Eric Covener
2020-03-25 01:52:48 +00:00
parent bdca42c7b5
commit 1acda06095
2 changed files with 7 additions and 1 deletions

View File

@ -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>]

View 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);
}