You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Michael Smith <mj...@iii.co.uk> on 1998/02/03 12:21:15 UTC

Proxy Rewriting adds headers?

Dear All,

I'm finding that if I use Rewrites with proxying, I sometimes get
undesirable headers added to the result (namely when I am trying to get
a rewrite).  For example, I have this in httpd.conf on this-machine

RewriteRule /script http://other-machine/script

If I talk direct to other-machine

[22]> telnet other-machine 8000
Trying 193.117.77.66...
Connected to tyree.
Escape character is '^]'.
GET /script HTTP/1.0

Status: 302 Found
Uri: xxxx
Location: xxxx
Content-type: text/html
Connection closed by foreign host.

This is output from CGI.pm, and it's fine - exactly what I would want.

If I talk to other-machine through this-machine (i.e. via the proxy)

[23]> telnet this machine
Trying 193.117.77.66...
Connected to tyree.
Escape character is '^]'.
GET /script HTTP/1.0


HTTP/1.0 200 OK
Date: Tue, 03 Feb 1998 11:04:38 GMT

Status: 302 Found
Uri: xxxx
Location: xxxx
Content-type: text/html
Connection closed by foreign host.

Which the browser does not interpret as a redirection instruction.  So,
the obvious question is, how do make sure my redirection makes it
through the proxying process unscathed?

Mike



Re: Proxy Rewriting adds headers?

Posted by Michael Smith <mj...@iii.co.uk>.
Agh - I'm a fool - this only happens when you mess up your headers - you
can get away with it when there's no proxy involved.

Time for me to lie down in a darkened room

> Dear All,
>
> I'm finding that if I use Rewrites with proxying, I sometimes get
> undesirable headers added to the result (namely when I am trying to get
> a rewrite).  For example, I have this in httpd.conf on this-machine
>
> RewriteRule /script http://other-machine/script
>
> If I talk direct to other-machine
>
> [22]> telnet other-machine 8000
> Trying 193.117.77.66...
> Connected to tyree.
> Escape character is '^]'.
> GET /script HTTP/1.0
>
> Status: 302 Found
> Uri: xxxx
> Location: xxxx
> Content-type: text/html
> Connection closed by foreign host.
>
> This is output from CGI.pm, and it's fine - exactly what I would want.
>
> If I talk to other-machine through this-machine (i.e. via the proxy)
>
> [23]> telnet this machine
> Trying 193.117.77.66...
> Connected to tyree.
> Escape character is '^]'.
> GET /script HTTP/1.0
>
> HTTP/1.0 200 OK
> Date: Tue, 03 Feb 1998 11:04:38 GMT
>
> Status: 302 Found
> Uri: xxxx
> Location: xxxx
> Content-type: text/html
> Connection closed by foreign host.
>
> Which the browser does not interpret as a redirection instruction.  So,
> the obvious question is, how do make sure my redirection makes it
> through the proxying process unscathed?
>
> Mike