You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2008/04/19 20:48:08 UTC
svn commit: r649840 - in /httpd/httpd/trunk/modules/proxy: mod_proxy_ajp.c
mod_proxy_http.c
Author: rpluem
Date: Sat Apr 19 11:48:05 2008
New Revision: 649840
URL: http://svn.apache.org/viewvc?rev=649840&view=rev
Log:
* Do not add the query string again in the case that we are using the
unparsed uri.
PR: 44803
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=649840&r1=649839&r2=649840&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Sat Apr 19 11:48:05 2008
@@ -31,7 +31,6 @@
{
char *host, *path, *search, sport[7];
const char *err;
- const char *pnocanon;
apr_port_t port = AJP13_DEF_PORT;
/* ap_port_of_scheme() */
@@ -59,27 +58,17 @@
/*
* now parse path/search args, according to rfc1738
- *
- * N.B. if this isn't a true proxy request, then the URL _path_
- * has already been decoded. True proxy requests have
- * r->uri == r->unparsed_uri, and no others have that property.
*/
- pnocanon = apr_table_get(r->notes, "proxy-nocanon");
- if ((r->uri == r->unparsed_uri) || pnocanon) {
- search = strchr(url, '?');
- if (search != NULL)
- *(search++) = '\0';
- }
- else
- search = r->args;
+ search = NULL;
/* process path */
- if (pnocanon) {
+ if (apr_table_get(r->notes, "proxy-nocanon")) {
path = url; /* this is the raw path */
}
else {
path = ap_proxy_canonenc(r->pool, url, strlen(url), enc_path, 0,
r->proxyreq);
+ search = r->args;
}
if (path == NULL)
return HTTP_BAD_REQUEST;
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=649840&r1=649839&r2=649840&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Sat Apr 19 11:48:05 2008
@@ -36,7 +36,6 @@
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() */
@@ -69,19 +68,7 @@
}
/* now parse path/search args, according to rfc1738 */
- /* N.B. if this isn't a true proxy request, then the URL _path_
- * has already been decoded. True proxy requests have r->uri
- * == r->unparsed_uri, and no others have that property.
- */
- 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';
- }
- else
- search = r->args;
+ search = NULL;
/* process path */
/* In a reverse proxy, our URL has been processed, so canonicalise
@@ -91,12 +78,13 @@
switch (r->proxyreq) {
default: /* wtf are we doing here? */
case PROXYREQ_REVERSE:
- if (pnocanon) {
+ if (apr_table_get(r->notes, "proxy-nocanon")) {
path = url; /* this is the raw path */
}
else {
path = ap_proxy_canonenc(r->pool, url, strlen(url),
enc_path, 0, r->proxyreq);
+ search = r->args;
}
break;
case PROXYREQ_PROXY: