On Tue, Jun 13, 2006 at 10:51:55AM -0000, [EMAIL PROTECTED] wrote: > Author: colm > Date: Tue Jun 13 03:51:54 2006 > New Revision: 413861 > > URL: http://svn.apache.org/viewvc?rev=413861&view=rev > Log: > A keepalive response need not neccessarily have included any content-length > header, handle this case properly for 304 responses. PR39789
This looks wrong, the patch in the PR was a bit better. If a response doesn't have a C-L/T-E the body is read till EOF. [23]04 are special cases which have zero length bodies regardless of the message headers. > > > Modified: > httpd/httpd/trunk/support/ab.c > > Modified: httpd/httpd/trunk/support/ab.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=413861&r1=413860&r2=413861&view=diff > ============================================================================== > --- httpd/httpd/trunk/support/ab.c (original) > +++ httpd/httpd/trunk/support/ab.c Tue Jun 13 03:51:54 2006 > @@ -1451,6 +1451,11 @@ > 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; >