]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix UseCanonicalCase off case where it'd improperly examine port number.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Sat, 27 Dec 2003 06:23:48 +0000 (06:23 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Sat, 27 Dec 2003 06:23:48 +0000 (06:23 +0000)
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*

Backport of server/core.c r1.248 from httpd-2.1
Submitted by: Jim Jagielski
Reviewed by: Brad Nicholes, Jim Jagielski, Justin Erenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@102116 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/core.c

diff --git a/CHANGES b/CHANGES
index 96b59f1946bd63580f559081198d7f0cdb5c1304..7c4eee7d6a26ba08ecb36fa9e6c3e1182d4dde44 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.49
 
+  *) Correct UseCanonicalName Off to properly check incoming port number.
+     [Jim Jagielski]
+
   *) Fix slow graceful restarts with prefork MPM.  [Joe Orton]
 
   *) Fix a problem with namespace mappings being dropped in mod_dav_fs;
index d79bb2d6c57cb8e9111869581b1d013571fedfd3..c51892b819bca20f47c488b10cb348290b5bf139 100644 (file)
@@ -935,7 +935,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->server->port ? r->server->port :
                ap_default_port(r);
     }