r3110 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Tue Aug 19 21:34:54 CEST 2008
Author: phk
Date: 2008-08-19 21:34:53 +0200 (Tue, 19 Aug 2008)
New Revision: 3110
Modified:
trunk/varnish-cache/bin/varnishd/cache_http.c
Log:
Fix ticket 292: Make sure the "deleted by Connection:" flag sticks
with its header around.
Found and nailed by: Adrian Otto <aotto at mosso.com>
Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c 2008-08-19 19:33:39 UTC (rev 3109)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c 2008-08-19 19:34:53 UTC (rev 3110)
@@ -604,6 +604,7 @@
Tcheck(fm->hd[n]);
if (to->nhd < HTTP_HDR_MAX) {
to->hd[to->nhd] = fm->hd[n];
+ to->hdf[to->nhd] = 0;
to->nhd++;
} else {
VSL_stats->losthdr++;
@@ -736,10 +737,12 @@
WSL(w, SLT_LostHeader, fd, "%s", string);
to->hd[field].b = NULL;
to->hd[field].e = NULL;
+ to->hdf[field] = 0;
} else {
memcpy(p, string, l + 1);
to->hd[field].b = p;
to->hd[field].e = p + l;
+ to->hdf[field] = 0;
}
}
@@ -786,6 +789,7 @@
} else {
to->hd[to->nhd].b = to->ws->f;
to->hd[to->nhd].e = to->ws->f + n;
+ to->hdf[to->nhd] = 0;
WS_Release(to->ws, n + 1);
to->nhd++;
}
@@ -800,8 +804,10 @@
for (v = u = HTTP_HDR_FIRST; u < hp->nhd; u++) {
if (http_IsHdr(&hp->hd[u], hdr))
continue;
- if (v != u)
+ if (v != u) {
memcpy(&hp->hd[v], &hp->hd[u], sizeof hp->hd[v]);
+ memcpy(&hp->hdf[v], &hp->hdf[u], sizeof hp->hdf[v]);
+ }
v++;
}
hp->nhd = v;
More information about the varnish-commit
mailing list