You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Axel Beckert <ap...@deuxchevaux.org> on 2001/12/02 21:07:56 UTC
general/8928: Listen doesn't set $SERVER_PORT for CGI/SSI right
>Number: 8928
>Category: general
>Synopsis: Listen doesn't set $SERVER_PORT for CGI/SSI right
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Sun Dec 02 12:10:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: apache-bugs@deuxchevaux.org
>Release: 2.0.28, 2.0.29
>Organization:
apache
>Environment:
uname -mrs: FreeBSD 4.2-RELEASE i386
gcc -v: gcc version 2.95.2 19991024 (release)
Apache 2.0.28 and 2.0.29-dev from CVS on 29-Nov-2001.
>Description:
If I use Port in my config Apache argues, that the Port directive isn't supported anymore. So I just use the Listen directive to set my Apache to run on port 8042. But if output the CGI environment variable SERVER_PORT via the SSI command #echo var="SERVER_PORT", I still get the "80" which was set via ./configure and AFAIK has been compiled into the apache httpd binary.
>How-To-Repeat:
See the example and footer on http://xcip3.studcs.uni-sb.de:8042/.
The sources of these SSI pages are also available there. See the bottom of the mentioned pages.
[If the host is down, try cip117 instead of xcip3.]
>Fix:
IMHO the value of SERVER_PORT should be set to the Port which the acutal request came in and not to some configured "default" value. Perhaps there should be a second CGI environment variable called "DEFAULT_PORT" or "SERVER_PORT_DEFAULT" which results in the default port (probably the first parameter to Listen in the vhost config section).
>Release-Note:
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]