]> granicus.if.org Git - apache/commitdiff
More removal of raw sockaddr references. This shouldn't cause any problems,
authorDavid Reid <dreid@apache.org>
Fri, 3 Nov 2000 15:08:06 +0000 (15:08 +0000)
committerDavid Reid <dreid@apache.org>
Fri, 3 Nov 2000 15:08:06 +0000 (15:08 +0000)
but folks may want to test it :)

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

modules/http/http_core.c

index 26c73af5a7e03f36d0dd32f8525ec6d475d49483..ec1da0edd7d989523dd8679798d9fbfd926ace62 100644 (file)
@@ -776,8 +776,8 @@ AP_DECLARE(unsigned) ap_get_server_port(const request_rec *r)
 
     if (d->use_canonical_name == USE_CANONICAL_NAME_OFF
        || d->use_canonical_name == USE_CANONICAL_NAME_DNS) {
-        return r->hostname ? ntohs(r->connection->local_addr.sin_port)
-                          : port;
+        if (r->hostname)
+           apr_get_local_port(&port, r->connection->client_socket);
     }
     /* default */
     return port;