]> err.no Git - varnish/commitdiff
Put three memory allocation hints into heritage:
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 10 Jul 2006 08:10:30 +0000 (08:10 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 10 Jul 2006 08:10:30 +0000 (08:10 +0000)
mem_http_1_line (512)
Maximum length of the reqeust/response line of a HTTP message
There is no point in filling the entire buffer with junk if
we get a preposterously long first line.
mem_http_header (4096)
Maximum length of entire HTTP header.  If we overflow this
we return 400.
mem_workspace (currently 0)
In the future this will be the space we use for constructing
headers to send and edits done from VCL.

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

varnish-cache/bin/varnishd/heritage.h
varnish-cache/bin/varnishd/varnishd.c

index a1c52d634e120f41b8ba0fb378ac157671fd373b..ae8bf0991088effd4679f91cf062816ca190dba7 100644 (file)
@@ -38,6 +38,11 @@ struct heritage {
 
        /* Worker threads */
        unsigned                wthread_min, wthread_max;
+
+       /* Memory allocation hints */
+       unsigned                mem_http_1_line;
+       unsigned                mem_http_header;
+       unsigned                mem_workspace;
 };
 
 extern struct heritage heritage;
index 72438827655671447ffba7f3c75c860b65ff04f1..b04e89b351e60f56f075fdc6bee4f64d31ae3c68 100644 (file)
@@ -457,6 +457,9 @@ main(int argc, char *argv[])
        heritage.default_ttl = 120;
        heritage.wthread_min = 5;
        heritage.wthread_max = 5;
+       heritage.mem_http_1_line= 512;
+       heritage.mem_http_header= 4096;
+       heritage.mem_workspace = 0;
 
        while ((o = getopt(argc, argv, "b:df:h:p:s:t:w:")) != -1)
                switch (o) {