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:25:32 GMT
Joshua Slive wrote:
> 
> On Thu, 6 Jun 2002, Josh Wyatt wrote:
> > With HTTP URI's, the "?" is a reserved character.  When dealing with
> > HTTP URI's, RFC 1738 says "don't encode special characters".
> 
> Actually, it is more like don't encode special characters when they are
> used in their special context.  When they are used outside their special
> context, the MUST be encoded.  ProxyPass does not allow you to pass a
> query string, so it assumes that the ? does not designate a query string
> and should be encoded.

Roger that.  I was not aware that ProxyPass didn't allow query-strings-
since they're definitively part of the URI (again, RFC 1738 section 3.3
I believe) I assumed they were proxyable.  Interestingly, I did try
Squid, which does the Right Thing.

Unfortunately, Squid isn't very good at reverse-proxying, and is really
too much for this application.

> 
> > 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.
> 
> Well, that is a very special case, and is not what ProxyPass was designed
> for.  RerwiteRule, on the other hand, can handle it.
> 
> > > 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).
> 
> Check the example I gave you again.  It uses the "P" flag to RewriteRule,
> which makes mod_rewrite use mod_proxy to grab the content just like
> ProxyPass.

You're right- I had not tried the P flag, and still haven't.  But I
trust that it will do what you say ;) .  Sorry for my initial oversight.

> Perhaps you have pointed out that the docs for ProxyPass are a little weak
> in this area.  They should point out that
> 
> 1. You can't pass a query string; and

That would certainly help.  They should also explain why-  Reading RFC
1738 it looks like you should, since it's officially part of the URI.

> 2. You can use RewriteRule for more complicated stuff.
> 
> Please submit a bug report against the documentation mentioning that if
> you have a chance.

Will do.  Thank you for all of your information and assistance.  If
you're ever in Raleigh, NC, look me up and we'll go have a few beers.

> 
> Joshua.

Thanks again,
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