diff options
author | Stefan Fritsch <sf@apache.org> | 2010-06-04 00:47:46 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2010-06-04 00:47:46 +0200 |
commit | 877b46df6ba3c66fb63af08074a1c1437fb81907 (patch) | |
tree | 742cf9c2929ae8c7de9d76062f14a503997c3914 /modules/proxy/proxy_util.c | |
parent | update compatability from 2.3.7 to 2.3.6 (diff) | |
download | apache2-877b46df6ba3c66fb63af08074a1c1437fb81907.tar.xz apache2-877b46df6ba3c66fb63af08074a1c1437fb81907.zip |
log issues with CONNECT at request scope instead of server scope
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951189 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | modules/proxy/proxy_util.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index b3c5cb4e61..6117f1f4ea 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1578,8 +1578,7 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock, apr_sockaddr_t *backend_addr, const char *backend_name, proxy_server_conf *conf, - server_rec *s, - apr_pool_t *p) + request_rec *r) { apr_status_t rv; int connected = 0; @@ -1587,13 +1586,13 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock, while (backend_addr && !connected) { if ((rv = apr_socket_create(newsock, backend_addr->family, - SOCK_STREAM, 0, p)) != APR_SUCCESS) { + SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) { loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR; - ap_log_error(APLOG_MARK, loglevel, rv, s, - "proxy: %s: error creating fam %d socket for target %s", - proxy_function, - backend_addr->family, - backend_name); + ap_log_rerror(APLOG_MARK, loglevel, rv, r, + "proxy: %s: error creating fam %d socket for target %s", + proxy_function, + backend_addr->family, + backend_name); /* * this could be an IPv6 address from the DNS but the * local machine won't give us an IPv6 socket; hopefully the @@ -1606,16 +1605,16 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock, if (conf->recv_buffer_size > 0 && (rv = apr_socket_opt_set(*newsock, APR_SO_RCVBUF, conf->recv_buffer_size))) { - ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, - "apr_socket_opt_set(SO_RCVBUF): Failed to set " - "ProxyReceiveBufferSize, using default"); + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + "apr_socket_opt_set(SO_RCVBUF): Failed to set " + "ProxyReceiveBufferSize, using default"); } rv = apr_socket_opt_set(*newsock, APR_TCP_NODELAY, 1); if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) { - ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, - "apr_socket_opt_set(APR_TCP_NODELAY): " - "Failed to set"); + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + "apr_socket_opt_set(APR_TCP_NODELAY): " + "Failed to set"); } /* Set a timeout on the socket */ @@ -1623,12 +1622,12 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock, apr_socket_timeout_set(*newsock, conf->timeout); } else { - apr_socket_timeout_set(*newsock, s->timeout); + apr_socket_timeout_set(*newsock, r->server->timeout); } - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, - "proxy: %s: fam %d socket created to connect to %s", - proxy_function, backend_addr->family, backend_name); + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + "proxy: %s: fam %d socket created to connect to %s", + proxy_function, backend_addr->family, backend_name); /* make the connection out of the socket */ rv = apr_socket_connect(*newsock, backend_addr); @@ -1637,11 +1636,11 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock, if (rv != APR_SUCCESS) { apr_socket_close(*newsock); loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR; - ap_log_error(APLOG_MARK, loglevel, rv, s, - "proxy: %s: attempt to connect to %pI (%s) failed", - proxy_function, - backend_addr, - backend_name); + ap_log_rerror(APLOG_MARK, loglevel, rv, r, + "proxy: %s: attempt to connect to %pI (%s) failed", + proxy_function, + backend_addr, + backend_name); backend_addr = backend_addr->next; continue; } |