httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Wyatt <Josh.Wy...@hcssystems.com>
Subject Re: Reverse Proxy munges chars
Date Thu, 06 Jun 2002 19:01:05 GMT
Firstly, Joshua, thanks for the reply!

Joshua Slive wrote:
<snip>
> > Specifically, section 2.2 of RFC 1738 says that special characters (such
> > as "?" in HTTP) should never be encoded- and it looks like mod_proxy
> > encodes ? to %3F during proxy.
> 
> I don't see that.  mod_proxy does not encode the query string; it is only
> this particular directive that does, and for very good reasons.

Something is encoding the ?; I suspect it is happening in
ap_proxy_canonenc in src/modules/proxy/proxy_util.c .

With HTTP URI's, the "?" is a reserved character.  When dealing with
HTTP URI's, RFC 1738 says "don't encode special characters".  mod_proxy
is doing it for some reason.  I played around with proxy_util.c a little
trying to get the desired effect, but alas, I'm weak on C, so my
experimentation is a little limited.

> > > >ProxyPass /
> > > >http://remote_server.otherdomain.com:7777/servlet?config=true
> 
> I don't see how that is supposed to work.  What happens when someone
> requests "http://yourserver.example.com/foo?bar"?  Is apache supposed to
> deliver
> "http://remote_server.otherdomain.com:7777/servlet?config=true/foo?bar"?

Actually, the only URI ever requested is the above URI.  The client
communicates with only that URI via GETs and POSTs.  The URI never
changes- thank the maker.  

It looks like a good rewrite candidate on the actual application
server.  However, I don't get control over that machine, nor would I
want to institute a non-standard (i.e. not out of the box) modification
to many application servers.

> 
> ProxyPass is meant for relatively simple transformations.  If you need
> something complex, you'll need to use mod_rewrite.  To get you started:

Yep, I've already used mod_rewrite, and it works - like a redirect. 
Only problem is that I've got to have a proxy.  I could easily rewrite
the URL to redirect to the actual server, but that bypasses the proxy,
breaking all kinds of stuff I'm trying to do (like single-source traffic
accounting, for one thing).

<snip>

> Joshua.

Again, I appreciate the discussion and thought.  I just wish there were
a solution to this problem.  I'm convinced that mod_proxy is converting
? to %3F somewhere- if perhaps someone could direct me to the location
in the source code, that's all I'd need at this point.

BTW, not sure if I mentioned it earlier, but I'm running 1.3.24 here.

Again, thanks for the responses.

Thanks,
josh

> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message