r1584 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Wed Jun 27 14:37:34 CEST 2007
Author: phk
Date: 2007-06-27 14:37:34 +0200 (Wed, 27 Jun 2007)
New Revision: 1584
Modified:
trunk/varnish-cache/bin/varnishd/cache_backend.c
Log:
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.
Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend.c 2007-06-27 12:21:58 UTC (rev 1583)
+++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2007-06-27 12:37:34 UTC (rev 1584)
@@ -81,7 +81,7 @@
{
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 @@
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);
More information about the varnish-commit
mailing list