]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
A keepalive response need not neccessarily have included any content-length
authorColm MacCarthaigh <colm@apache.org>
Tue, 13 Jun 2006 10:51:54 +0000 (10:51 +0000)
committerColm MacCarthaigh <colm@apache.org>
Tue, 13 Jun 2006 10:51:54 +0000 (10:51 +0000)
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

support/ab.c

index cf243910428d0739bbc6dc8d859ca6e4a7a09b1a..11e987fcef3d6f1abc3baf8a6727a25e094cdb8f 100644 (file)
@@ -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;