You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2008/04/17 16:06:29 UTC

svn commit: r649115 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS support/ab.c

Author: jim
Date: Thu Apr 17 07:06:27 2008
New Revision: 649115

URL: http://svn.apache.org/viewvc?rev=649115&view=rev
Log:
Merge r612954 from trunk:

* 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

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/support/ab.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=649115&r1=649114&r2=649115&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Apr 17 07:06:27 2008
@@ -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]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=649115&r1=649114&r2=649115&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Thu Apr 17 07:06:27 2008
@@ -88,14 +88,6 @@
 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

Modified: httpd/httpd/branches/2.2.x/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/support/ab.c?rev=649115&r1=649114&r2=649115&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/support/ab.c (original)
+++ httpd/httpd/branches/2.2.x/support/ab.c Thu Apr 17 07:06:27 2008
@@ -1424,7 +1424,8 @@
                     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;