[master] 3a1ba09 Only look at client requests in varnishhist.
Martin Blix Grydeland
martin at varnish-software.com
Tue Feb 25 15:58:40 CET 2014
commit 3a1ba09193055cc43d3c9896edaec7939a7e37f5
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Tue Feb 25 14:05:19 2014 +0100
Only look at client requests in varnishhist.
Without the -b -c options enabled, looking at backend requests becomes
ill-defined. Disable anything but non-esi client requests for
now. This can be extended in the future.
diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index 1767db0..faec821 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -199,10 +199,14 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
(void)priv;
for (tr = pt[0]; tr != NULL; tr = *++pt) {
+ if (tr->type != VSL_t_req)
+ /* Only look at client requests */
+ continue;
+ if (tr->reason == VSL_r_esi)
+ /* Skip ESI requests */
+ continue;
value = -1;
hit = 0;
- if (tr->type != VSL_t_bereq && tr->type != VSL_t_req)
- continue;
while ((1 == VSL_Next(tr->c))) {
/* get the value we want, and register if it's a hit*/
tag = VSL_TAG(tr->c->rec.ptr);
More information about the varnish-commit
mailing list