Mailing List Archive

Bug report: SERVER_PORT set to port 80 for non-port-80 virthost CGI env
Apparently SERVER_PORT is always being set to "80" in the CGI
environment, even when the actual port is different. Any thoughts on
where to track this down in the code?

Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com brian@hyperreal.com http://www.[hyperreal,organic].com/
Re: Bug report: SERVER_PORT set to port 80 for non-port-80 virthost CGI env [ In reply to ]
Date: Mon, 10 Jul 1995 20:01:12 -0700 (PDT)
From: Brian Behlendorf <brian@organic.com>
Precedence: bulk
Reply-To: new-httpd@hyperreal.com


Apparently SERVER_PORT is always being set to "80" in the CGI
environment, even when the actual port is different. Any thoughts on
where to track this down in the code?

I suspect this is only happening for virtual hosts --- if so, you
should look into where the port entry in the virtual host server_rec
structures gets set (and if it doesn't, as I think it might not,
change fixup_virtual_hosts in http_config.c to do the right thing).

FWIW, my /cgi-bin/printenv script does see it set correctly for
non-virtual-host setups, but if it's working differently for you, then
the thing that's going bad is probably the code to implement the
"Port" command itself, in http_core.c (the code that implements in the
core module).

rst