Bug 45833 - Wrong SERVER_PORT passed in virtual host with wildcard port
Summary: Wrong SERVER_PORT passed in virtual host with wildcard port
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cgi (show other bugs)
Version: 2.2.9
Hardware: Sun Solaris
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2008-09-18 07:12 UTC by HWS
Modified: 2008-09-29 01:54 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description HWS 2008-09-18 07:12:40 UTC
With <VirtualHost _default_:*> or <VirtualHost *:*> and Listen 8080 in the global configuration, the CGI variable SERVER_PORT is always passed as 80, although the URI is given as http://hostname:8080/some_cgi_script. This is independent of the setting of UseCanonicalName. If <VirtualHost _default_:8080> or <VirtualHost *:8080> is used, the resulting SERVER_PORT is correct.
This bug does not occur with apache-1.3.41. I did not test 2.0.x.
Comment 1 HWS 2008-09-29 01:54:43 UTC
Sorry, I overlooked the new directive UseCanonicalPhysicalPort, which defaults to "off" (thus ignoring the physical port used). If it is set to "on" in the main server or virtual host section, the "bug" does not occur.