From: Colm MacCarthaigh Date: Tue, 13 Jun 2006 10:51:54 +0000 (+0000) Subject: A keepalive response need not neccessarily have included any content-length X-Git-Tag: 2.3.0~2337 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=825c3efbccd5e63f00534d259214cfa736beea0f;p=thirdparty%2Fapache%2Fhttpd.git A keepalive response need not neccessarily have included any content-length header, handle this case properly for 304 responses. PR39789 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@413861 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index cf243910428..11e987fcef3 100644 --- a/support/ab.c +++ b/support/ab.c @@ -1451,6 +1451,11 @@ static void read_connection(struct connection * c) c->keepalive = 1; c->length = atoi(cl + 16); } + /* The response may not have a Content-Length header */ + if (!cl) { + c->keepalive = 1; + c->length = 0; + } } c->bread += c->cbx - (s + l - c->cbuff) + r - tocopy; totalbread += c->bread;