r3627 - branches/2.0/varnish-cache/bin/varnishd
tfheen at projects.linpro.no
tfheen at projects.linpro.no
Thu Feb 5 13:44:21 CET 2009
Author: tfheen
Date: 2009-02-05 13:44:21 +0100 (Thu, 05 Feb 2009)
New Revision: 3627
Modified:
branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c
Log:
Merge r3423: Count ESI processed objects in acct.bodybytes
Modified: branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c 2009-02-05 12:40:54 UTC (rev 3626)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_vrt_esi.c 2009-02-05 12:44:21 UTC (rev 3627)
@@ -800,12 +800,14 @@
struct object *obj;
VTAILQ_FOREACH(eb, &sp->obj->esibits, list) {
+ assert(sp->wrk->wfd = &sp->fd);
if (Tlen(eb->verbatim)) {
if (sp->http->protover >= 1.1)
- WRK_Write(sp->wrk, eb->chunk_length, -1);
- WRK_Write(sp->wrk, eb->verbatim.b, Tlen(eb->verbatim));
+ (void)WRK_Write(sp->wrk, eb->chunk_length, -1);
+ sp->wrk->acct.bodybytes += WRK_Write(sp->wrk,
+ eb->verbatim.b, Tlen(eb->verbatim));
if (sp->http->protover >= 1.1)
- WRK_Write(sp->wrk, "\r\n", -1);
+ (void)WRK_Write(sp->wrk, "\r\n", -1);
}
if (eb->include.b == NULL ||
sp->esis >= params->max_esi_includes)
@@ -814,9 +816,10 @@
/*
* We flush here, because the next transaction is
* quite likely to take some time, so we should get
- * as many bits to the client as we can already
+ * as many bits to the client as we can already.
*/
- WRK_Flush(sp->wrk);
+ if (WRK_Flush(sp->wrk))
+ break;
sp->esis++;
obj = sp->obj;
@@ -859,8 +862,9 @@
sp->obj = obj;
}
+ assert(sp->wrk->wfd = &sp->fd);
if (sp->esis == 0 && sp->http->protover >= 1.1)
- WRK_Write(sp->wrk, "0\r\n\r\n", -1);
+ (void)WRK_Write(sp->wrk, "0\r\n\r\n", -1);
}
/*--------------------------------------------------------------------*/
More information about the varnish-commit
mailing list