]> err.no Git - varnish/commitdiff
Don't fill the entire workspace with read-ahead data.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 27 Jun 2007 12:43:08 +0000 (12:43 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 27 Jun 2007 12:43:08 +0000 (12:43 +0000)
Eventually we need to separate the "max http header size" from the
workspace size, but that will take a bit of pondering.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1585 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_http.c

index 653ea14baea6af6ea7fbaeb3774d81ef180866c0..3a3969b63190de1c0137e983ba00fe6f9e1003aa 100644 (file)
@@ -631,6 +631,7 @@ http_RecvSome(int fd, struct http *hp)
        int i;
 
        l = (hp->ws->e - hp->rx_e) - 1;
+       l /= 2;         /* Don't fill all of workspace with read-ahead */
        if (l <= 1) {
                VSL(SLT_HttpError, fd, "Received too much");
                VSLR(SLT_HttpGarbage, fd, hp->rx_s, hp->rx_e);