]> granicus.if.org Git - apache/commitdiff
ab: Fix read failure when targeting SSL server.
authorJeff Trawick <trawick@apache.org>
Fri, 10 Aug 2012 17:54:16 +0000 (17:54 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 10 Aug 2012 17:54:16 +0000 (17:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371791 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
support/ab.c

diff --git a/CHANGES b/CHANGES
index 883b801fe446b5f71fabc4cb57a39a587ddefe30..47edc7f82f65a41042c99f7a1acf2292258b64bc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) ab: Fix read failure when targeting SSL server.  [Jeff Trawick]
+
   *) mod_lua: Decline handling 'lua-script' if the file doesn't exist,
      rather than throwing an internal server error. [Daniel Gruno]
 
index 9c968f1eb1f609128f933382db3c56cc19f44edb..133084db818909b883283d4bb270733ae4370814 100644 (file)
@@ -1347,11 +1347,21 @@ static void read_connection(struct connection * c)
                 good++;
                 close_connection(c);
             }
+            else if (scode == SSL_ERROR_SYSCALL
+                     && status == 0
+                     && c->read != 0) {
+                /* connection closed, but in violation of the protocol, after
+                 * some data has already been read; this commonly happens, so
+                 * let the length check catch any response errors
+                 */
+                good++;
+                close_connection(c);
+            }
             else if (scode != SSL_ERROR_WANT_WRITE
                      && scode != SSL_ERROR_WANT_READ) {
                 /* some fatal error: */
                 c->read = 0;
-                BIO_printf(bio_err, "SSL read failed - closing connection\n");
+                BIO_printf(bio_err, "SSL read failed (%d) - closing connection\n", scode);
                 ERR_print_errors(bio_err);
                 close_connection(c);
             }