mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
mod_proxy_connect,wstunnel: log polling errors (and events) consistently at
level ERR (resp. TRACE2), and name the backend connection "backend" instead of "sock". git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754161 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -381,10 +381,9 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
|
|||||||
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01023) "error apr_poll()");
|
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01023) "error apr_poll()");
|
||||||
return HTTP_INTERNAL_SERVER_ERROR;
|
return HTTP_INTERNAL_SERVER_ERROR;
|
||||||
}
|
}
|
||||||
#ifdef DEBUGGING
|
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01024)
|
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, APLOGNO(01024)
|
||||||
"woke from poll(), i=%d", pollcnt);
|
"woke from poll(), i=%d", pollcnt);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (pi = 0; pi < pollcnt; pi++) {
|
for (pi = 0; pi < pollcnt; pi++) {
|
||||||
const apr_pollfd_t *cur = &signalled[pi];
|
const apr_pollfd_t *cur = &signalled[pi];
|
||||||
@@ -392,20 +391,18 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
|
|||||||
if (cur->desc.s == sock) {
|
if (cur->desc.s == sock) {
|
||||||
pollevent = cur->rtnevents;
|
pollevent = cur->rtnevents;
|
||||||
if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
|
if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
|
||||||
#ifdef DEBUGGING
|
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, APLOGNO(01025)
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01025)
|
"backend was readable");
|
||||||
"sock was readable");
|
|
||||||
#endif
|
|
||||||
done |= ap_proxy_transfer_between_connections(r, backconn,
|
done |= ap_proxy_transfer_between_connections(r, backconn,
|
||||||
c, bb_back,
|
c, bb_back,
|
||||||
bb_front,
|
bb_front,
|
||||||
"sock", NULL,
|
"backend", NULL,
|
||||||
CONN_BLKSZ, 1)
|
CONN_BLKSZ, 1)
|
||||||
!= APR_SUCCESS;
|
!= APR_SUCCESS;
|
||||||
}
|
}
|
||||||
else if (pollevent & APR_POLLERR) {
|
else if (pollevent & APR_POLLERR) {
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(01026)
|
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01026)
|
||||||
"err on backconn");
|
"err on backend connection");
|
||||||
backconn->aborted = 1;
|
backconn->aborted = 1;
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
@@ -413,10 +410,8 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
|
|||||||
else if (cur->desc.s == client_socket) {
|
else if (cur->desc.s == client_socket) {
|
||||||
pollevent = cur->rtnevents;
|
pollevent = cur->rtnevents;
|
||||||
if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
|
if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
|
||||||
#ifdef DEBUGGING
|
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, APLOGNO(01027)
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01027)
|
|
||||||
"client was readable");
|
"client was readable");
|
||||||
#endif
|
|
||||||
done |= ap_proxy_transfer_between_connections(r, c,
|
done |= ap_proxy_transfer_between_connections(r, c,
|
||||||
backconn,
|
backconn,
|
||||||
bb_front,
|
bb_front,
|
||||||
@@ -427,8 +422,8 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
|
|||||||
!= APR_SUCCESS;
|
!= APR_SUCCESS;
|
||||||
}
|
}
|
||||||
else if (pollevent & APR_POLLERR) {
|
else if (pollevent & APR_POLLERR) {
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02827)
|
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02827)
|
||||||
"err on client");
|
"err on client connection");
|
||||||
c->aborted = 1;
|
c->aborted = 1;
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
|
@@ -76,7 +76,7 @@ static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout, int try_po
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02445)
|
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, APLOGNO(02445)
|
||||||
"woke from poll(), i=%d", pollcnt);
|
"woke from poll(), i=%d", pollcnt);
|
||||||
|
|
||||||
for (pi = 0; pi < pollcnt; pi++) {
|
for (pi = 0; pi < pollcnt; pi++) {
|
||||||
@@ -85,23 +85,23 @@ static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout, int try_po
|
|||||||
if (cur->desc.s == sock) {
|
if (cur->desc.s == sock) {
|
||||||
pollevent = cur->rtnevents;
|
pollevent = cur->rtnevents;
|
||||||
if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
|
if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02446)
|
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, APLOGNO(02446)
|
||||||
"sock was readable");
|
"backend was readable");
|
||||||
done |= ap_proxy_transfer_between_connections(r, backconn,
|
done |= ap_proxy_transfer_between_connections(r, backconn,
|
||||||
c, bb_i, bb_o,
|
c, bb_i, bb_o,
|
||||||
"sock", NULL,
|
"backend", NULL,
|
||||||
AP_IOBUFSIZE,
|
AP_IOBUFSIZE,
|
||||||
0)
|
0)
|
||||||
!= APR_SUCCESS;
|
!= APR_SUCCESS;
|
||||||
}
|
}
|
||||||
else if (pollevent & APR_POLLERR) {
|
else if (pollevent & APR_POLLERR) {
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02447)
|
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02447)
|
||||||
"error on backconn");
|
"error on backend connection");
|
||||||
backconn->aborted = 1;
|
backconn->aborted = 1;
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02605)
|
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02605)
|
||||||
"unknown event on backconn %d", pollevent);
|
"unknown event on backconn %d", pollevent);
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
@@ -109,7 +109,7 @@ static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout, int try_po
|
|||||||
else if (cur->desc.s == client_socket) {
|
else if (cur->desc.s == client_socket) {
|
||||||
pollevent = cur->rtnevents;
|
pollevent = cur->rtnevents;
|
||||||
if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
|
if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02448)
|
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, APLOGNO(02448)
|
||||||
"client was readable");
|
"client was readable");
|
||||||
done |= ap_proxy_transfer_between_connections(r, c, backconn,
|
done |= ap_proxy_transfer_between_connections(r, c, backconn,
|
||||||
bb_o, bb_i,
|
bb_o, bb_i,
|
||||||
@@ -120,13 +120,13 @@ static int proxy_wstunnel_pump(ws_baton_t *baton, apr_time_t timeout, int try_po
|
|||||||
!= APR_SUCCESS;
|
!= APR_SUCCESS;
|
||||||
}
|
}
|
||||||
else if (pollevent & APR_POLLERR) {
|
else if (pollevent & APR_POLLERR) {
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02607)
|
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02607)
|
||||||
"error on client conn");
|
"error on client connection");
|
||||||
c->aborted = 1;
|
c->aborted = 1;
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02606)
|
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02606)
|
||||||
"unknown event on client conn %d", pollevent);
|
"unknown event on client conn %d", pollevent);
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user