getting $r and env to reflect external ports

2009-08-14 Thread Jonathan Swartz
We've got a bunch of legacy code that uses $ENV{SCRIPT_URI}, $ENV{SERVER_PORT}, $r->server->port and the like to generate external redirects. This has worked fine til now, but now we are moving to a system where our external port != our internal port - the load balancer is going to forwar

Re: getting $r and env to reflect external ports

2009-08-14 Thread André Warnier
Jonathan Swartz wrote: We've got a bunch of legacy code that uses $ENV{SCRIPT_URI}, $ENV{SERVER_PORT}, $r->server->port and the like to generate external redirects. If these are really external redirects, they must happen through a "Location:" response header, no ? In that case, what about le

Re: getting $r and env to reflect external ports

2009-08-14 Thread Jonathan Swartz
> We've got a bunch of legacy code that uses $ENV{SCRIPT_URI}, > $ENV{SERVER_PORT}, $r->server->port and the like to generate external > redirects. > If these are really external redirects, they must happen through a "Location:" response header, no ? In that case, what about leaving your code a

Re: getting $r and env to reflect external ports

2009-08-15 Thread Torsten Foertsch
On Sat 15 Aug 2009, Jonathan Swartz wrote: > We've got a bunch of legacy code that uses $ENV{SCRIPT_URI},   > $ENV{SERVER_PORT}, $r->server->port and the like to generate external >   redirects. > > This has worked fine til now, but now we are moving to a system where >   our external port != our i