From: Jim Jagielski Date: Thu, 13 Nov 2003 15:18:35 +0000 (+0000) Subject: parsed_uri.port is only valid iff parsed_uri.port_str != NULL. X-Git-Tag: pre_ajp_proxy~1048 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ee9b271ec48453b17fea8dc552c25074c8fcdf5;p=thirdparty%2Fapache%2Fhttpd.git parsed_uri.port is only valid iff parsed_uri.port_str != NULL. Old code simply checked if it was non-zero, not if it was *valid* PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101774 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index 527ad8b9d1e..14e3f7e0750 100644 --- a/server/core.c +++ b/server/core.c @@ -927,7 +927,7 @@ AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r) * URLs using the hostname and port supplied by the client if * any are supplied (otherwise it will use the canonical name). */ - port = r->parsed_uri.port ? r->parsed_uri.port : + port = r->parsed_uri.port_str ? r->parsed_uri.port : r->connection->local_addr->port ? r->connection->local_addr->port : r->server->port ? r->server->port : ap_default_port(r);