Commit 5691f839 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

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: http://www.varnish-cache.org/svn/trunk/varnish-cache@1584 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 199f24f6
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment