]> granicus.if.org Git - apache/commitdiff
With a last little bit of help from Justin, this should cause the
authorWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 5 Nov 2002 03:38:14 +0000 (03:38 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Tue, 5 Nov 2002 03:38:14 +0000 (03:38 +0000)
  appropriate amount of tumolt and turmoil if our client has 'gone away'
  on us, sparing us of further processing (and potential 'renegotiations'
  with a non-existant client.)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97400 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_io.c

index cb1d0fe40113347d6bfb6e054bdb46922846cbad..264a3d7f4e0b23da2a5049aa37843d013bdd16a4 100644 (file)
@@ -643,6 +643,12 @@ static apr_status_t ssl_io_filter_Output(ap_filter_t *f,
     apr_status_t status = APR_SUCCESS;
     SSLFilterRec *filter_ctx = f->ctx;
 
+    if (f->c->aborted) {
+        /* XXX: This works in 2.0.43, but this will change soon */
+        apr_brigade_cleanup(bb);
+        return APR_ECONNABORTED;
+    }
+
     if (!filter_ctx->pssl) {
         /* ssl_abort() has been called */
         return ap_pass_brigade(f->next, bb);
@@ -950,6 +956,16 @@ static apr_status_t ssl_io_filter_Input(ap_filter_t *f,
     apr_size_t len = sizeof(inctx->buffer);
     int is_init = (mode == AP_MODE_INIT);
 
+    if (f->c->aborted) {
+        /* XXX: Ok, if we aborted, we ARE at the EOS.  We also have
+         * aborted.  This 'double protection' is probably redundant,
+         * but also effective against just about anything.
+         */
+        apr_bucket *bucket = apr_bucket_eos_create(f->c->bucket_alloc);
+        APR_BRIGADE_INSERT_TAIL(bb, bucket);
+        return APR_ECONNABORTED;
+    }
+
     if (!inctx->ssl) {
         return ap_get_brigade(f->next, bb, mode, block, readbytes);
     }