]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r612954 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 17 Apr 2008 14:06:27 +0000 (14:06 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 17 Apr 2008 14:06:27 +0000 (14:06 +0000)
* Do not try to read non existing response bodies of HEAD requests.

PR: 34275
Submitted by: Takashi Sato <serai lans-tv.com>
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

CHANGES
STATUS
support/ab.c

diff --git a/CHANGES b/CHANGES
index 3c44a87cba3ad8c800a34f1ae3841518a52a4d2d..b14e7d71dc5f8cdc6b3f511defd682922f44b25e 100644 (file)
--- 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 <serai lans-tv.com>]
+
   *) 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 9434ae3334873f10d8d6da691815a63a96c180dc..06080e12e6cff030171728b4bad4f1c7f0239fee 100644 (file)
--- 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
index fb191e54a20c6038c4e1d696e1b704ad6d956656..ca899cba920e0d27e26b16a110d84b3a0648f02a 100644 (file)
@@ -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;