diff options
author | Ruediger Pluem <rpluem@apache.org> | 2008-01-17 21:01:55 +0100 |
---|---|---|
committer | Ruediger Pluem <rpluem@apache.org> | 2008-01-17 21:01:55 +0100 |
commit | f298644bdaf5426ff25b0655dcf12a6823b19875 (patch) | |
tree | cac22bd05aa37c80a13aff4316ba66377e56f599 /support | |
parent | Tidying up the SSL FAQ, incorporating changes suggested by Lucien Gentis (diff) | |
download | apache2-f298644bdaf5426ff25b0655dcf12a6823b19875.tar.xz apache2-f298644bdaf5426ff25b0655dcf12a6823b19875.zip |
* 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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@612954 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r-- | support/ab.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) { |