From 9c659fecb34508c419d268f7de922a150fdc07b4 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Fri, 10 Aug 2012 17:54:16 +0000 Subject: [PATCH] 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 --- CHANGES | 2 ++ support/ab.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 883b801fe4..47edc7f82f 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 9c968f1eb1..133084db81 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); } -- 2.50.1