httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r612954 - in /httpd/httpd/trunk: CHANGES support/ab.c
Date Thu, 17 Jan 2008 20:01:58 GMT
Author: rpluem
Date: Thu Jan 17 12:01:55 2008
New Revision: 612954

URL: http://svn.apache.org/viewvc?rev=612954&view=rev
Log:
* 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

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/support/ab.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=612954&r1=612953&r2=612954&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Jan 17 12:01:55 2008
@@ -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>]
 

Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=612954&r1=612953&r2=612954&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Thu Jan 17 12:01:55 2008
@@ -1463,7 +1463,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;
                 }
                 /* The response may not have a Content-Length header */
                 if (!cl) {



Mime
View raw message