You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2009/10/05 22:56:48 UTC

svn commit: r822004 - in /httpd/httpd/trunk: CHANGES modules/mappers/mod_rewrite.c

Author: minfrin
Date: Mon Oct  5 20:56:48 2009
New Revision: 822004

URL: http://svn.apache.org/viewvc?rev=822004&view=rev
Log:
mod_rewrite: Make sure that a hostname:port isn't fully qualified if
the request is a CONNECT request.
Submitted by: Bill Zajac <billz consultla.com>

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/mappers/mod_rewrite.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=822004&r1=822003&r2=822004&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Oct  5 20:56:48 2009
@@ -10,6 +10,9 @@
      mod_proxy_ftp: NULL pointer dereference on error paths.
      [Stefan Fritsch <sf fritsch.de>, Joe Orton]
 
+  *) mod_rewrite: Make sure that a hostname:port isn't fully qualified if
+     the request is a CONNECT request. [Bill Zajac <billz consultla.com>]
+
   *) mod_cache: Teach CacheEnable and CacheDisable to work from within a
      Location section, in line with how ProxyPass works. [Graham Leggett]
 

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=822004&r1=822003&r2=822004&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Mon Oct  5 20:56:48 2009
@@ -870,7 +870,10 @@
  */
 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;