On Wed, 5 Dec 2001, Greg Stein wrote:
> The Port directive used to set the server->port variable. When Port was
> tossed, we also lost the use of server->port. That affects the response of
> ap_get_server_port() and ap_matches_request_vhost().
same problem when there was a Port directive and no Port directive was
configured. configuring ServerName foo:port will fix that.
i was told that was "the expected behavior" back when i posted this patch,
but it still applies..
Date: Thu, 9 Aug 2001 18:59:08 -0700 (PDT)
From: Doug MacEachern <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Listen vs. Port
Message-ID: <[EMAIL PROTECTED]>
if Listen is used to set the server port, and Port is not configured,
ap_get_server_port returns the default port (80). this breaks mod_dir
redirects if Listen is something other than 80. should Listen also set
the server->port (as in the patch below) or is it required that Port must
also be configured?
Index: server/listen.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/listen.c,v
retrieving revision 1.59
diff -u -r1.59 listen.c
--- server/listen.c 2001/07/26 16:36:40 1.59
+++ server/listen.c 2001/08/10 01:51:35
@@ -353,6 +353,10 @@
return "Port must be specified";
}
+ if (!cmd->server->port) {
+ cmd->server->port = port;
+ }
+
alloc_listener(cmd->server->process, host, port);
return NULL;