You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2010/06/11 11:10:29 UTC
svn commit: r953616 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS
modules/filters/mod_reqtimeout.c modules/proxy/mod_proxy_ajp.c
modules/proxy/mod_proxy_http.c
Author: rjung
Date: Fri Jun 11 09:10:29 2010
New Revision: 953616
URL: http://svn.apache.org/viewvc?rev=953616&view=rev
Log:
Merge r953377,r953385,r953418 from trunk:
mod_proxy_http, mod_proxy_ajp, mod_reqtimeout:
Use APR_STATUS_IS_TIMEUP instead of direct compare
to APR_TIMEUP to be more safe on different platforms.
Submitted by: rjung, rpluem
Reviewed by: rjung, rpluem, wrowe
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/STATUS
httpd/httpd/branches/2.2.x/modules/filters/mod_reqtimeout.c
httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c
httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=953616&r1=953615&r2=953616&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Fri Jun 11 09:10:29 2010
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.16
+ *) mod_proxy_ajp, mod_proxy_http, mod_reqtimeout: Fix timeout detection
+ for platforms Windows, Netware and OS2. [Rainer Jung]
+
*) mod_ssl: Fix segfault at startup if proxy client certs are shared
across multiple vhosts. PR 39915. [Joe Orton]
Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=953616&r1=953615&r2=953616&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Fri Jun 11 09:10:29 2010
@@ -132,14 +132,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
+1: niq, pgollucci
+1: rbowen - After much debate on IRC, we've agreed on FallbackResource as being the right name for this.
- * mod_proxy_http, mod_proxy_ajp, mod_reqtimeout: Use APR_STATUS_IS_TIMEUP
- instead of direct compare to APR_TIMEUP to be more safe on different platforms.
- Backport from trunk of http://svn.apache.org/viewvc?rev=953418&view=rev
- http://svn.apache.org/viewvc?rev=953385&view=rev
- http://svn.apache.org/viewvc?rev=953377&view=rev
- +1: rjung, wrowe, rpluem
- -1:
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
Modified: httpd/httpd/branches/2.2.x/modules/filters/mod_reqtimeout.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/filters/mod_reqtimeout.c?rev=953616&r1=953615&r2=953616&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/filters/mod_reqtimeout.c (original)
+++ httpd/httpd/branches/2.2.x/modules/filters/mod_reqtimeout.c Fri Jun 11 09:10:29 2010
@@ -155,7 +155,7 @@ static apr_status_t reqtimeout_filter(ap
extend_timeout(ccfg, bb);
}
- if (rv == APR_TIMEUP) {
+ if (APR_STATUS_IS_TIMEUP(rv)) {
ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c,
"Request %s read timeout", ccfg->type);
}
Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c?rev=953616&r1=953615&r2=953616&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_ajp.c Fri Jun 11 09:10:29 2010
@@ -450,15 +450,18 @@ static int ap_proxy_ajp_request(apr_pool
}
}
else {
+ apr_status_t rv;
+
e = apr_bucket_transient_create(send_body_chunk_buff, size,
r->connection->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(output_brigade, e);
if ((conn->worker->flush_packets == flush_on) ||
((conn->worker->flush_packets == flush_auto) &&
- (apr_poll(conn_poll, 1, &conn_poll_fd,
- conn->worker->flush_wait)
- == APR_TIMEUP) ) ) {
+ ((rv = apr_poll(conn_poll, 1, &conn_poll_fd,
+ conn->worker->flush_wait))
+ != APR_SUCCESS) &&
+ APR_STATUS_IS_TIMEUP(rv))) {
e = apr_bucket_flush_create(r->connection->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(output_brigade, e);
}
Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c?rev=953616&r1=953615&r2=953616&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c Fri Jun 11 09:10:29 2010
@@ -1401,7 +1401,7 @@ apr_status_t ap_proxy_http_process_respo
ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
"proxy: error reading status line from remote "
"server %s:%d", backend->hostname, backend->port);
- if (rc == APR_TIMEUP) {
+ if (APR_STATUS_IS_TIMEUP(rc)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"proxy: read timeout");
}
@@ -1417,7 +1417,7 @@ apr_status_t ap_proxy_http_process_respo
* we normally would handle timeouts
*/
if (r->proxyreq == PROXYREQ_REVERSE && c->keepalives &&
- rc != APR_TIMEUP) {
+ !APR_STATUS_IS_TIMEUP(rc)) {
apr_bucket *eos;
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
@@ -1449,6 +1449,8 @@ apr_status_t ap_proxy_http_process_respo
APR_BUCKET_INSERT_BEFORE(eos, e);
}
ap_pass_brigade(r->output_filters, bb);
+ /* Mark the backend connection for closing */
+ backend->close = 1;
/* Need to return OK to avoid sending an error message */
return OK;
}