> 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 alone and use an output
filter modifying these Location headers ?

Good question. That could work for redirects. But some of the code also examines the values of these ports in conditionals, e.g.

    if ($ENV{SERVER_PORT} == 80) { ... }

It isn't pretty, but it's old code and I don't want to be the one to break it. :) Ideally I want the code to see the environment as it was before the port switch. Maybe this is asking too much though...

Jon

Reply via email to