From: Jim Jagielski Date: Tue, 14 Aug 2012 20:52:53 +0000 (+0000) Subject: Merge r1364133, r1371791 from trunk: X-Git-Tag: 2.4.3~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=681f3f1c3d64c432e02314b7a022448ad713c3d1;p=apache Merge r1364133, r1371791 from trunk: When -B is specified, search for a host address in the same family as the specified outbound interface. If impossible, fail at name resolution instead of bind(). ab: Fix read failure when targeting SSL server. Submitted by: trawick Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1373084 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 2f7cba3cf5..03a7607c3c 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,8 @@ Changes with Apache 2.4.3 possible XSS for a site where untrusted users can upload files to a location with MultiViews enabled. [Niels Heinen ] + *) ab: Fix read failure when targeting SSL server. [Jeff Trawick] + *) The following now respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR: - mod_auth_digest: shared memory file [Jeff Trawick] diff --git a/STATUS b/STATUS index 9aa1cdea6f..2ac399ca34 100644 --- a/STATUS +++ b/STATUS @@ -93,15 +93,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: 2.4.x patch: trunk patch works +1: rjung, humbedooh, trawick (needs CHANGES entry) - * ab fixes: - o When -B is specified, search for a host address in the same - family as the specified outbound interface. - o Fix read failure when targeting SSL server. - trunk patches: http://svn.apache.org/viewvc?view=revision&revision=1364133 - http://svn.apache.org/viewvc?view=revision&revision=1371791 - 2.4.x patch: trunk patches work - +1: trawick, rjung, jim - * httpd.conf.in: remove DNT header field from MSIE 10.0 requests because the browser is deliberately violating the standard under development. trunk patch: http://svn.apache.org/viewvc?rev=1371878&view=rev diff --git a/support/ab.c b/support/ab.c index d2b1a986f9..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); } @@ -1700,7 +1710,9 @@ static void test(void) } /* This too */ - if ((rv = apr_sockaddr_info_get(&destsa, connecthost, APR_UNSPEC, connectport, 0, cntxt)) + if ((rv = apr_sockaddr_info_get(&destsa, connecthost, + myhost ? mysa->family : APR_UNSPEC, + connectport, 0, cntxt)) != APR_SUCCESS) { char buf[120]; apr_snprintf(buf, sizeof(buf),