specified they want to use the CanonicalName, but they have not
configured a port with the ServerName, then use the same port that
the original request used.
Submitted by: Ryan Bloom and Ken Coar
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93296
13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.0.32-dev
+ *) Be a bit more sane with regard to CanonicalNames. If the user has
+ specified they want to use the CanonicalName, but they have not
+ configured a port with the ServerName, then use the same port that
+ the original request used. [Ryan Bloom and Ken Coar]
+
*) In core_input_filter, check for an empty brigade after
APR_BRIGADE_NORMALIZE(). Otherwise, we can get segfaults if a
client says it will post some data but we get FIN before any
* Apache will use the hostname and port specified in the
* ServerName directive to construct a canonical name for the
* server. (If no port was specified in the ServerName
- * directive, Apache implies port 80 for http:// and
- * port 443 for https://)
+ * directive, Apache uses the port supplied by the client if
+ * any is supplied, and finally the default port for the protocol
+ * used.
*/
- port = r->server->port ? r->server->port : ap_default_port(r);
+ port = r->server->port ? r->server->port :
+ r->connection->local_addr->port ? r->connection->local_addr->port :
+ ap_default_port(r);
}
/* default */