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 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;
* 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);
}