httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r649239 - in /httpd/httpd/trunk/modules/proxy: mod_proxy_ajp.c mod_proxy_http.c
Date Thu, 17 Apr 2008 19:20:18 GMT
Author: jim
Date: Thu Apr 17 12:20:16 2008
New Revision: 649239

URL: http://svn.apache.org/viewvc?rev=649239&view=rev
Log:
handle ? in cases where nocanon is in effect

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
    httpd/httpd/trunk/modules/proxy/mod_proxy_http.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c?rev=649239&r1=649238&r2=649239&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Thu Apr 17 12:20:16 2008
@@ -31,6 +31,7 @@
 {
     char *host, *path, *search, sport[7];
     const char *err;
+    const char *pnocanon;
     apr_port_t port = AJP13_DEF_PORT;
 
     /* ap_port_of_scheme() */
@@ -63,7 +64,8 @@
      * has already been decoded.  True proxy requests have
      * r->uri == r->unparsed_uri, and no others have that property.
      */
-    if (r->uri == r->unparsed_uri) {
+    pnocanon = apr_table_get(r->notes, "proxy-nocanon");
+    if ((r->uri == r->unparsed_uri) ||  pnocanon) {
         search = strchr(url, '?');
         if (search != NULL)
             *(search++) = '\0';
@@ -72,7 +74,7 @@
         search = r->args;
 
     /* process path */
-    if (apr_table_get(r->notes, "proxy-nocanon")) {
+    if (pnocanon) {
         path = url;   /* this is the raw path */
     }
     else {

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c?rev=649239&r1=649238&r2=649239&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Thu Apr 17 12:20:16 2008
@@ -36,6 +36,7 @@
     char *host, *path, *search, sport[7];
     const char *err;
     const char *scheme;
+    const char *pnocanon;
     apr_port_t port, def_port;
 
     /* ap_port_of_scheme() */
@@ -72,7 +73,9 @@
      * has already been decoded.  True proxy requests have r->uri
      * == r->unparsed_uri, and no others have that property.
      */
-    if (r->uri == r->unparsed_uri) {
+    pnocanon = apr_table_get(r->notes, "proxy-nocanon");
+    if ((r->uri == r->unparsed_uri) ||
+        ((r->proxyreq == PROXYREQ_REVERSE) && pnocanon)) {
         search = strchr(url, '?');
         if (search != NULL)
             *(search++) = '\0';
@@ -88,7 +91,7 @@
     switch (r->proxyreq) {
     default: /* wtf are we doing here? */
     case PROXYREQ_REVERSE:
-        if (apr_table_get(r->notes, "proxy-nocanon")) {
+        if (pnocanon) {
             path = url;   /* this is the raw path */
         }
         else {



Mime
View raw message