]> granicus.if.org Git - apache/commitdiff
handling TIMEUP on SSL inputs by allowing later retries
authorStefan Eissing <icing@apache.org>
Thu, 21 Jan 2016 13:14:07 +0000 (13:14 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 21 Jan 2016 13:14:07 +0000 (13:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725940 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/ssl/ssl_engine_io.c

diff --git a/CHANGES b/CHANGES
index e83d781ab52ab26e25bf60a43f69a99fa09ea0e1..43f88aa0853b770eca8ad0548dbf77769e872326 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_ssl: handle TIMEOUT on empty SSL input as non-fatal, returning 
+     APR_TIMEUP and preserving connection state for later retry.
+     [Stefan Eissing]
+     
   *) ap_expr: expression support for r->kept_body if it exists.
      [Jim Jagielski]
 
index c86bdb0e4ee94db72bdffb2d6fb9694939457859..99a4982938d8b3419be777a0c2fe3ef7dbd02d5a 100644 (file)
@@ -506,6 +506,12 @@ static int bio_filter_in_read(BIO *bio, char *in, int inlen)
             return -1;
         }
 
+        if (block == APR_BLOCK_READ 
+            && APR_STATUS_IS_TIMEUP(inctx->rc)
+            && APR_BRIGADE_EMPTY(inctx->bb)) {
+            /* don't give up, just return the timeout */
+            return -1;
+        }
         if (inctx->rc != APR_SUCCESS) {
             /* Unexpected errors discard the brigade */
             apr_brigade_cleanup(inctx->bb);
@@ -722,6 +728,10 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
                     }
                     continue;  /* Blocking and nothing yet?  Try again. */
                 }
+                else if (APR_STATUS_IS_TIMEUP(inctx->rc)) {
+                    /* just return it, the calling layer might be fine with it,
+                       and we do not want to bloat the log. */
+                }
                 else {
                     ap_log_cerror(APLOG_MARK, APLOG_INFO, inctx->rc, c, APLOGNO(01991)
                                   "SSL input filter read failed.");