]> err.no Git - varnish/commitdiff
Make sure to reset the workspaces of the backend connection between
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 27 Jun 2007 12:37:34 +0000 (12:37 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 27 Jun 2007 12:37:34 +0000 (12:37 +0000)
requests, otherwise we end up filling it up with Content-Length: headers
if we manage to keep the backend busy.

Also make the snapshot of the preferred workspace-size volatile to ensure
that we are consistent.

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

varnish-cache/bin/varnishd/cache_backend.c

index f15001fd0d795f0b3e1e479833996ccc3c71ad98..10f5fc3402d3616a9360cbdf91c4b151be090de2 100644 (file)
@@ -81,7 +81,7 @@ vbe_new_conn(void)
 {
        struct vbe_conn *vbc;
        unsigned char *p;
-       unsigned space;
+       volatile unsigned space;
 
        space =  params->mem_workspace;
        vbc = calloc(sizeof *vbc + space * 2, 1);
@@ -353,6 +353,8 @@ VBE_RecycleFd(struct worker *w, struct vbe_conn *vc)
        assert(vc->fd >= 0);
        AN(vc->backend);
        WSL(w, SLT_BackendReuse, vc->fd, "%s", vc->backend->vcl_name);
+       WS_Reset(vc->http->ws);
+       WS_Reset(vc->http2->ws);
        LOCK(&vbemtx);
        VSL_stats->backend_recycle++;
        TAILQ_INSERT_HEAD(&vc->backend->connlist, vc, list);