]> granicus.if.org Git - apache/commitdiff
Add some source comments about worker DNS lookup.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 11 Aug 2004 22:12:02 +0000 (22:12 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 11 Aug 2004 22:12:02 +0000 (22:12 +0000)
Submitted by: mturk

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

modules/proxy/proxy_util.c

index 81124e2f7942385022bd29d956b541bf609b632c..506d9afdaa48289f3916af941722c1de73088cea 100644 (file)
@@ -1396,7 +1396,6 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
     if (proxyname) {
         mconf->conn_rec->hostname = apr_pstrdup(ppool, proxyname);
         mconf->conn_rec->port = proxyport;
-        /* see memory note above */
     } else {
         mconf->conn_rec->hostname = apr_pstrdup(ppool, uri->hostname);
         mconf->conn_rec->port = uri->port;
@@ -1405,13 +1404,17 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
                            uri->fragment ? "#" : "",
                            uri->fragment ? uri->fragment : "", NULL);
     }
+    /* Worker can have the single constant backend adress.
+     * The single DNS lookup is used once per worker.
+     * If dynamic change is needed then set the addr to NULL
+     * inside dynamic config to force the lookup.
+     */
     if (!mconf->worker->cp->addr)
         err = apr_sockaddr_info_get(&(mconf->worker->cp->addr),
                                     mconf->conn_rec->hostname, APR_UNSPEC,
                                     mconf->conn_rec->port, 0,
                                     mconf->worker->cp->pool);
 
-    /* do a DNS lookup for the destination host */
     if (err != APR_SUCCESS) {
         return ap_proxyerror(r, HTTP_BAD_GATEWAY,
                              apr_pstrcat(p, "DNS lookup failure for: ",