]> granicus.if.org Git - apache/commit
implement a common function for getting a socket and trying to connect
authorJeff Trawick <trawick@apache.org>
Fri, 8 Mar 2002 02:03:47 +0000 (02:03 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 8 Mar 2002 02:03:47 +0000 (02:03 +0000)
commit1151bac94baa9be8b69a0c8b6598f521bad8fec6
treed47acab18f51adce8c888a4deaa46a7aca55d34b
parent987b098777fbda8052c6a176d7fff86a861b0109
implement a common function for getting a socket and trying to connect
to the target host; use that common function for proxy HTTP and proxy
CONNECT

In that new function, fix this problem:

     Proxy HTTP and CONNECT: Keep trying other addresses from the DNS
     when we can't get a socket in the specified address family.  We may
     have gotten back an IPv6 address first and yet our system is not
     configured to allow IPv6 sockets.

An example host is www.ipv6.org.  The first address I get back is
an IPv6 address, but my machine may not be configured to allow an
AF_INET6 socket.

Before the fix: The apr_socket() failure was fatal.
After the fix:  When apr_socket() fails, we go to the next address from
                the resolver, successfully create a socket in the
                specified family (AF_INET), and all is well.

(an unrelated fix in this commit was to pass a server_rec in a broken
ap_log_error() call)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93787 13f79535-47bb-0310-9956-ffa450edef68
CHANGES
modules/proxy/mod_proxy.h
modules/proxy/proxy_connect.c
modules/proxy/proxy_http.c
modules/proxy/proxy_util.c