From: Jeff Trawick Date: Fri, 10 Aug 2012 17:54:16 +0000 (+0000) Subject: ab: Fix read failure when targeting SSL server. X-Git-Tag: 2.5.0-alpha~6447 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c659fecb34508c419d268f7de922a150fdc07b4;p=thirdparty%2Fapache%2Fhttpd.git ab: Fix read failure when targeting SSL server. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1371791 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 883b801fe44..47edc7f82f6 100644 --- 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] diff --git a/support/ab.c b/support/ab.c index 9c968f1eb1f..133084db818 100644 --- a/support/ab.c +++ b/support/ab.c @@ -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); }