]> granicus.if.org Git - apache/commitdiff
PR:
authorDoug MacEachern <dougm@apache.org>
Tue, 26 Mar 2002 00:30:47 +0000 (00:30 +0000)
committerDoug MacEachern <dougm@apache.org>
Tue, 26 Mar 2002 00:30:47 +0000 (00:30 +0000)
Obtained from:
Submitted by:
Reviewed by:
fix bug seen on win32 with netscape client where output filter is run
triggered by lingering_close after ssl_hook_CloseConnection has been called

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

modules/ssl/ssl_engine_io.c

index a2a338dc463e33df86234f0d216d32c2614d259a..fd620cdc818c50e3447fc8ac75173155e4fc72f9 100644 (file)
@@ -579,6 +579,12 @@ static apr_status_t ssl_io_filter_Output(ap_filter_t *f,
                                          apr_bucket_brigade *bb)
 {
     apr_status_t status = APR_SUCCESS;
+    SSLFilterRec *ctx = f->ctx;
+
+    if (!ctx->pssl) {
+        /* ssl_hook_CloseConnection has already been called */
+        return ap_pass_brigade(f->next, bb);
+    }
 
     while (!APR_BRIGADE_EMPTY(bb)) {
         apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
@@ -587,8 +593,6 @@ static apr_status_t ssl_io_filter_Output(ap_filter_t *f,
          * These types do not require translation by OpenSSL.  
          */
         if (APR_BUCKET_IS_EOS(bucket) || APR_BUCKET_IS_FLUSH(bucket)) {
-            SSLFilterRec *ctx = f->ctx;
-
             if ((status = BIO_bucket_flush(ctx->pbioWrite)) != APR_SUCCESS) {
                 return status;
             }