From: Jim Jagielski Date: Thu, 17 Apr 2008 14:06:27 +0000 (+0000) Subject: Merge r612954 from trunk: X-Git-Tag: 2.2.9~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab60bf9941c36ce21d968b38ab99f4e209d016f7;p=thirdparty%2Fapache%2Fhttpd.git Merge r612954 from trunk: * Do not try to read non existing response bodies of HEAD requests. PR: 34275 Submitted by: Takashi Sato Reviewed by: rpluem Submitted by: rpluem Reviewed by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@649115 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 3c44a87cba3..b14e7d71dc5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.9 + *) ab: Do not try to read non existing response bodies of HEAD requests. + PR 34275 [Takashi Sato ] + *) ab: Use a 64 bit unsigned int instead of a signed long to count the bytes transferred to avoid integer overflows. PR 44346 [Ruediger Pluem] diff --git a/STATUS b/STATUS index 9434ae33348..06080e12e6c 100644 --- a/STATUS +++ b/STATUS @@ -88,14 +88,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * ab: ab very poor performance with both -k and -i cmdline options specified - PR34275 - Trunk version of patch: - http://svn.apache.org/viewvc?rev=612954&view=rev - Backport version for 2.2.x of patch: - Trunk version of patch works - +1: rpluem, jim, covener - * http_filter: Don't spin if we get an error when reading (the next) chunk. PR: 44381 diff --git a/support/ab.c b/support/ab.c index fb191e54a20..ca899cba920 100644 --- a/support/ab.c +++ b/support/ab.c @@ -1424,7 +1424,8 @@ static void read_connection(struct connection * c) cl = strstr(c->cbuff, "Content-length:"); if (cl) { c->keepalive = 1; - c->length = atoi(cl + 16); + /* response to HEAD doesn't have entity body */ + c->length = posting >= 0 ? atoi(cl + 16) : 0; } } c->bread += c->cbx - (s + l - c->cbuff) + r - tocopy;