]> granicus.if.org Git - apache/commitdiff
* Do not try to read non existing response bodies of HEAD requests.
authorRuediger Pluem <rpluem@apache.org>
Thu, 17 Jan 2008 20:01:55 +0000 (20:01 +0000)
committerRuediger Pluem <rpluem@apache.org>
Thu, 17 Jan 2008 20:01:55 +0000 (20:01 +0000)
PR: 34275
Submitted by: Takashi Sato <serai lans-tv.com>
Reviewed by: rpluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@612954 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
support/ab.c

diff --git a/CHANGES b/CHANGES
index be0eecf50dc88a34afa33509d90a8c06225611f3..2f7f42e8f9690eb369c6837d478c0c548375737a 100644 (file)
--- 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>]
 
index 58299a3db208f9873d6d61ca57a077562ec18f99..46040af0d4958b909e6c02f640f9d550f7497edf 100644 (file)
@@ -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) {