From 157e996cea52f2b50527dfbe6669515f49f70a44 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 27 Jun 2007 12:37:34 +0000 Subject: [PATCH] Make sure to reset the workspaces of the backend connection between 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/varnish-cache/bin/varnishd/cache_backend.c b/varnish-cache/bin/varnishd/cache_backend.c index f15001fd..10f5fc34 100644 --- a/varnish-cache/bin/varnishd/cache_backend.c +++ b/varnish-cache/bin/varnishd/cache_backend.c @@ -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); -- 2.39.5