httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1371791 - in /httpd/httpd/trunk: CHANGES support/ab.c
Date Fri, 10 Aug 2012 17:54:16 GMT
Author: trawick
Date: Fri Aug 10 17:54:16 2012
New Revision: 1371791

URL: http://svn.apache.org/viewvc?rev=1371791&view=rev
Log:
ab: Fix read failure when targeting SSL server.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/support/ab.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1371791&r1=1371790&r2=1371791&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri Aug 10 17:54:16 2012
@@ -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]
 

Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=1371791&r1=1371790&r2=1371791&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Fri Aug 10 17:54:16 2012
@@ -1347,11 +1347,21 @@ static void read_connection(struct conne
                 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);
             }



Mime
View raw message