]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Needed to check this, but ap_parse_uri_components was not ensuring that
authorVictor J. Orlikowski <orlikowski@apache.org>
Wed, 4 Apr 2001 06:56:28 +0000 (06:56 +0000)
committerVictor J. Orlikowski <orlikowski@apache.org>
Wed, 4 Apr 2001 06:56:28 +0000 (06:56 +0000)
the parsed uri's port field was set. This one-liner takes care of that.
Reviewed by: Chuck Murcko <chuck@topsail.org>

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

src/main/util_uri.c

index d73413c63ad4e7fb4fce751cd2d5a1ad6fb068c3..ac2e838fe463cb4fd1c1e94d885f09e658620e01 100644 (file)
@@ -421,6 +421,7 @@ API_EXPORT(int) ap_parse_uri_components(pool *p, const char *uri,
         if (s == NULL) {
             /* we expect the common case to have no port */
             uptr->hostname = ap_pstrndup(p, hostinfo, uri - hostinfo);
+            uptr->port = uptr->scheme ? ap_default_port_for_scheme(uptr->scheme) : DEFAULT_HTTP_PORT;
             goto deal_with_path;
         }
         uptr->hostname = ap_pstrndup(p, hostinfo, s - hostinfo);