Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 81363 invoked by uid 500); 6 Feb 2002 16:58:38 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 81352 invoked by uid 500); 6 Feb 2002 16:58:38 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 6 Feb 2002 16:58:37 -0000 Message-ID: <20020206165837.28766.qmail@icarus.apache.org> From: rbb@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server core.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N rbb 02/02/06 08:58:37 Modified: . CHANGES server core.c Log: 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. Submitted by: Ryan Bloom and Ken Coar Revision Changes Path 1.567 +5 -0 httpd-2.0/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/httpd-2.0/CHANGES,v retrieving revision 1.566 retrieving revision 1.567 diff -u -r1.566 -r1.567 --- CHANGES 5 Feb 2002 22:56:44 -0000 1.566 +++ CHANGES 6 Feb 2002 16:58:36 -0000 1.567 @@ -1,5 +1,10 @@ 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 1.147 +6 -3 httpd-2.0/server/core.c Index: core.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/core.c,v retrieving revision 1.146 retrieving revision 1.147 diff -u -r1.146 -r1.147 --- core.c 6 Feb 2002 16:16:55 -0000 1.146 +++ core.c 6 Feb 2002 16:58:37 -0000 1.147 @@ -799,10 +799,13 @@ * 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 */