From b86ddabbef2beb75f150ab8de672b41119160b11 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Sun, 20 Apr 2008 14:23:25 +0000 Subject: [PATCH] Set at init time, and combine comments git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@649922 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy_ajp.c | 10 +++++----- modules/proxy/mod_proxy_http.c | 11 ++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c index 698ad5e985..0fb5984be0 100644 --- a/modules/proxy/mod_proxy_ajp.c +++ b/modules/proxy/mod_proxy_ajp.c @@ -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 */ } diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 996a2e8210..e118a4ff1a 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -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. */ -- 2.40.0