]> granicus.if.org Git - apache/commitdiff
Merge r1725940 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 11 Feb 2016 19:03:54 +0000 (19:03 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 11 Feb 2016 19:03:54 +0000 (19:03 +0000)
handling TIMEUP on SSL inputs by allowing later retries
Submitted by: icing
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1729874 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/ssl/ssl_engine_io.c

diff --git a/CHANGES b/CHANGES
index e7dd9081c4aec1f421fa16d5d1a02ed9f6322619..68950ad537b643c399cd9313e0c5f66ec195e475 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.4.19
 
+  *) mod_ssl: handle TIMEOUT on empty SSL input as non-fatal, returning 
+     APR_TIMEUP and preserving connection state for later retry.
+     [Stefan Eissing]
+     
   *) mod_ssl: Save some TLS record (application data) fragmentations by
      including the last and subsequent suitable buckets when coalescing.
      [Yann Ylavic]
diff --git a/STATUS b/STATUS
index 7283baa9508f2545b1bd12ddeada526375b8bca9..b69018fa8ebe97fcddee00f97f2d0ea74b032650 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -112,11 +112,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_ssl: handle APR_TIMEUP on empty input by keeping connection state valid
-              for later retries.
-     trunk patch:  http://svn.apache.org/r1725940
-     +1: icing, jim, ylavic
-
   *) core: Prevent a server crash in case of an invalid CONNECT request with
      a custom error page for status code 400 that uses server side includes.
      PR 58929
index 5a5a538161385938ef329e9d2afdc5c215148fe8..ab2c933d87d1afed2b69678a6305ef5240b8c730 100644 (file)
@@ -489,6 +489,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);
@@ -670,6 +676,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.");