You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2008/09/28 17:36:45 UTC

svn commit: r699841 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/proxy/mod_proxy_http.c

Author: covener
Date: Sun Sep 28 08:36:44 2008
New Revision: 699841

URL: http://svn.apache.org/viewvc?rev=699841&view=rev
Log:
Merge r697362 from trunk:

For timeouts, behave as before and not drop.
Submitted by: Adam Woodworth <mirkperl gmail.com>
Reviewed by: jim, rpluem, covener


Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    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=699841&r1=699840&r2=699841&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Sun Sep 28 08:36:44 2008
@@ -5,6 +5,10 @@
      mod_proxy_ftp: Prevent XSS attacks when using wildcards in the path of
      the FTP URL. Discovered by Marc Bevand of Rapid7. [Ruediger Pluem]
 
+  *) mod_proxy_http: Don't trigger a retry by the client if a failure to
+     read the response line was the result of a timeout.
+     [Adam Woodworth <mirkperl gmail.com>]
+
   *) Support chroot on Unix-family platforms
      PR 43596 [Dimitar Pashev <mitko banksoft-bg.com>]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=699841&r1=699840&r2=699841&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Sun Sep 28 08:36:44 2008
@@ -85,15 +85,6 @@
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_proxy_http: Do not close the connection to the client if the reading
-     of a response from the backend failed due to a timeout.
-     [Adam Woodworth <mirkperl gmail.com>]
-    Trunk version of patch:
-       http://svn.apache.org/viewvc?rev=697362&view=rev
-    Backport version for 2.2.x of patch:
-       Trunk version of patch works
-   +1: rpluem, jim, covener
-
 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/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c?rev=699841&r1=699840&r2=699841&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 Sun Sep 28 08:36:44 2008
@@ -1375,6 +1375,10 @@
             ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
                           "proxy: error reading status line from remote "
                           "server %s", backend->hostname);
+            if (rc == APR_TIMEUP) {
+                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+                              "proxy: read timeout");
+            }
             /*
              * If we are a reverse proxy request shutdown the connection
              * WITHOUT ANY response to trigger a retry by the client
@@ -1382,9 +1386,12 @@
              * BUT currently we should not do this if the request is the
              * first request on a keepalive connection as browsers like
              * seamonkey only display an empty page in this case and do
-             * not do a retry.
+             * not do a retry. We should also not do this on a
+             * connection which times out; instead handle as
+             * we normally would handle timeouts
              */
-            if (r->proxyreq == PROXYREQ_REVERSE && c->keepalives) {
+            if (r->proxyreq == PROXYREQ_REVERSE && c->keepalives &&
+                rc != APR_TIMEUP) {
                 apr_bucket *eos;
 
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,