summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--support/ab.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index be0eecf50d..2f7f42e8f9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
Changes with Apache 2.3.0
[ When backported to 2.2.x, remove entry from this file ]
+ *) ab: Do not try to read non existing response bodies of HEAD requests.
+ PR 34275 [Takashi Sato <serai lans-tv.com>]
+
*) Support chroot on Unix-family platforms
PR 43596 [Dimitar Pashev <mitko banksoft-bg.com>]
diff --git a/support/ab.c b/support/ab.c
index 58299a3db2..46040af0d4 100644
--- a/support/ab.c
+++ b/support/ab.c
@@ -1463,7 +1463,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;
}
/* The response may not have a Content-Length header */
if (!cl) {