]> granicus.if.org Git - apache/commitdiff
Set at init time, and combine comments
authorJim Jagielski <jim@apache.org>
Sun, 20 Apr 2008 14:23:25 +0000 (14:23 +0000)
committerJim Jagielski <jim@apache.org>
Sun, 20 Apr 2008 14:23:25 +0000 (14:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649922 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_ajp.c
modules/proxy/mod_proxy_http.c

index 698ad5e9853240a412507de61dd1e6414e228be2..0fb5984be02b745a2713b637aa4a487dc73bc6b1 100644 (file)
@@ -29,7 +29,8 @@ module AP_MODULE_DECLARE_DATA proxy_ajp_module;
  */
 static int proxy_ajp_canon(request_rec *r, char *url)
 {
-    char *host, *path, *search, sport[7];
+    char *host, *path, sport[7];
+    char *search = NULL;
     const char *err;
     apr_port_t port = AJP13_DEF_PORT;
 
@@ -57,11 +58,10 @@ static int proxy_ajp_canon(request_rec *r, char *url)
     }
 
     /*
-     * now parse path/search args, according to rfc1738
+     * now parse path/search args, according to rfc1738:
+     * process the path. With proxy-noncanon set (by
+     * mod_proxy) we use the raw, unparsed uri
      */
-    search = NULL;
-
-    /* process path */
     if (apr_table_get(r->notes, "proxy-nocanon")) {
         path = url;   /* this is the raw path */
     }
index 996a2e8210bb828594f098bd3b55197da8fca442..e118a4ff1a20dadeaa2a66f28465ef39564f2c43 100644 (file)
@@ -34,6 +34,7 @@ static apr_status_t ap_proxy_http_cleanup(const char *scheme,
 static int proxy_http_canon(request_rec *r, char *url)
 {
     char *host, *path, *search, sport[7];
+    char *search = NULL;
     const char *err;
     const char *scheme;
     apr_port_t port, def_port;
@@ -67,11 +68,11 @@ static int proxy_http_canon(request_rec *r, char *url)
         return HTTP_BAD_REQUEST;
     }
 
-    /* now parse path/search args, according to rfc1738 */
-    search = NULL;
-
-    /* process path */
-    /* In a reverse proxy, our URL has been processed, so canonicalise
+    /*
+     * now parse path/search args, according to rfc1738:
+     * process the path.
+     *
+     * In a reverse proxy, our URL has been processed, so canonicalise
      * unless proxy-nocanon is set to say it's raw
      * In a forward proxy, we have and MUST NOT MANGLE the original.
      */