You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by je...@apache.org on 2005/02/04 00:58:39 UTC

svn commit: r151260 - in httpd/httpd/branches/2.0.x: CHANGES modules/ssl/ssl_engine_io.c

Author: jerenkrantz
Date: Thu Feb  3 15:58:38 2005
New Revision: 151260

URL: http://svn.apache.org/viewcvs?view=rev&rev=151260
Log:
mod_ssl: fail quickly if SSL connection is aborted rather than making many
doomed ap_pass_brigade calls.

MFC: 125166
PR: 32699
Reviewed by: jorton, jerenkrantz, jim

Modified:
    httpd/httpd/branches/2.0.x/CHANGES
    httpd/httpd/branches/2.0.x/modules/ssl/ssl_engine_io.c

Modified: httpd/httpd/branches/2.0.x/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.0.x/CHANGES?view=diff&r1=151259&r2=151260
==============================================================================
--- httpd/httpd/branches/2.0.x/CHANGES (original)
+++ httpd/httpd/branches/2.0.x/CHANGES Thu Feb  3 15:58:38 2005
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.53
 
+  *) mod_ssl: fail quickly if SSL connection is aborted rather than
+     making many doomed ap_pass_brigade calls.  PR 32699.  [Joe Orton]
+
   *) Remove compiled-in upper limit on LimitRequestFieldSize.
      [Bill Stoddard]
 

Modified: httpd/httpd/branches/2.0.x/modules/ssl/ssl_engine_io.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.0.x/modules/ssl/ssl_engine_io.c?view=diff&r1=151259&r2=151260
==============================================================================
--- httpd/httpd/branches/2.0.x/modules/ssl/ssl_engine_io.c (original)
+++ httpd/httpd/branches/2.0.x/modules/ssl/ssl_engine_io.c Thu Feb  3 15:58:38 2005
@@ -153,6 +153,10 @@
 
     outctx->rc = ap_pass_brigade(outctx->filter_ctx->pOutputFilter->next,
                                  outctx->bb);
+    /* Fail if the connection was reset: */
+    if (outctx->rc == APR_SUCCESS && outctx->c->aborted) {
+        outctx->rc = APR_ECONNRESET;
+    }
     return (outctx->rc == APR_SUCCESS) ? 1 : -1;
 }