r1123 - trunk/varnish-cache/bin/varnishncsa

andersb at projects.linpro.no andersb at projects.linpro.no
Sun Sep 24 19:14:28 CEST 2006


Author: andersb
Date: 2006-09-24 19:14:28 +0200 (Sun, 24 Sep 2006)
New Revision: 1123

Modified:
   trunk/varnish-cache/bin/varnishncsa/varnishncsa.c
Log:
Fixed: Correctly logging "-" when there is no User-Agent or Referer.

Note: Still builds with warning.



Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c
===================================================================
--- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c	2006-09-24 16:17:06 UTC (rev 1122)
+++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c	2006-09-24 17:14:28 UTC (rev 1123)
@@ -198,11 +198,18 @@
 		free(lp->df_R);
 		lp->df_R = NULL;
 	}
+	else {
+	        fprintf(fo, " \"-\"");
+				        }
+
 	if (lp->df_U != NULL) {
 		fprintf(fo, " \"%s\"", lp->df_U);
 		free(lp->df_U);
 		lp->df_U = NULL;
 	}
+	else {
+		fprintf(fo, " \"-\"");
+	}
 	fprintf(fo, "\n");
 
 	return (0);




More information about the varnish-commit mailing list