]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
parsed_uri.port is only valid iff parsed_uri.port_str != NULL.
authorJim Jagielski <jim@apache.org>
Thu, 13 Nov 2003 15:18:35 +0000 (15:18 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 13 Nov 2003 15:18:35 +0000 (15:18 +0000)
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

server/core.c

index 527ad8b9d1e43d614f92901f329775f432f71a31..14e3f7e0750695c6d54b2445267e77471532613b 100644 (file)
@@ -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);