From 524135fc045eed32045517b54e46a6a1c132f2c8 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Mon, 2 Nov 2009 21:59:04 +0000 Subject: [PATCH] Merge r822004 from trunk: mod_rewrite: Make sure that a hostname:port isn't fully qualified if the request is a CONNECT request. Submitted by: Bill Zajac Reviewed by: sf, minfrin, covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@832124 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 5 ----- modules/mappers/mod_rewrite.c | 5 ++++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 6880c40054a..bdcfc9906fc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.15 + *) mod_rewrite: Make sure that a hostname:port isn't fully qualified if + the request is a CONNECT request. [Bill Zajac ] + *) mod_cache: correctly consider s-maxage in cacheability decisions. [Dan Poirier] diff --git a/STATUS b/STATUS index 64c933a3c45..2ea6b0c0417 100644 --- a/STATUS +++ b/STATUS @@ -87,11 +87,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_rewrite: don't fully qualify hostname:port if the request is a CONNECT - request - Trunk Patch: http://svn.apache.org/viewvc?view=rev&revision=822004 - 2.2.x Patch: trunk patch works - +1: sf, minfrin, covener PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index e92c440986d..d5bd56797eb 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -845,7 +845,10 @@ static void reduce_uri(request_rec *r) */ static void fully_qualify_uri(request_rec *r) { - if (!is_absolute_uri(r->filename)) { + if (r->method_number == M_CONNECT) { + return; + } + else if (!is_absolute_uri(r->filename)) { const char *thisserver; char *thisport; int port; -- 2.47.2