[experimental-ims] fe7e315 Print 0, not - for zero-byte replies

Geoff Simmons geoff at varnish-cache.org
Mon Aug 1 13:18:08 CEST 2011


commit fe7e315cb98ffdc2e4f510e43c7b54bc1af840c1
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date:   Mon Jul 11 09:50:09 2011 +0200

    Print 0, not - for zero-byte replies
    
    Fixes: #949

diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index 89c1ee1..521d52e 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -546,7 +546,7 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
 
 		case 'b':
 			/* %b */
-			fprintf(fo, "%s", lp->df_b ? lp->df_b : "-");
+			fprintf(fo, "%s", lp->df_b ? lp->df_b : "0");
 			break;
 
 		case 'H':



More information about the varnish-commit mailing list