[master] ebf15eb Ignore piped requests in varnishncsa, since we probably miss some of their information

Tollef Fog Heen tfheen at varnish-cache.org
Mon May 30 13:34:30 CEST 2011


commit ebf15ebd61974be719ce315f95caa8c835ea37d6
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date:   Mon May 30 13:02:23 2011 +0200

    Ignore piped requests in varnishncsa, since we probably miss some of their information
    
    Fixes: #918

diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index 6a3f684..022d955 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -426,8 +426,10 @@ collect_client(struct logline *lp, enum vsl_tag tag, unsigned spec,
 			lp->df_hitmiss = "miss";
 			lp->df_handling = "pass";
 		} else if (strncmp(ptr, "pipe", len) == 0) {
-			lp->df_hitmiss = "miss";
-			lp->df_handling = "pipe";
+			/* Just skip piped requests, since we can't
+			 * print their status code */
+			clean_logline(lp);
+			break;
 		}
 		break;
 
@@ -587,7 +589,7 @@ h_ncsa(void *priv, enum vsl_tag tag, unsigned fd,
 
 		case 's':
 			/* %s */
-			fprintf(fo, "%s", lp->df_s);
+			fprintf(fo, "%s", lp->df_s ? lp->df_s : "");
 			break;
 
 		case 't':



More information about the varnish-commit mailing list