From: andersb Date: Sun, 24 Sep 2006 17:14:28 +0000 (+0000) Subject: Fixed: Correctly logging "-" when there is no User-Agent or Referer. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ab22d61db32f69e001b21831bea1d25b81adfed;p=varnish Fixed: Correctly logging "-" when there is no User-Agent or Referer. Note: Still builds with warning. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1123 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishncsa/varnishncsa.c b/varnish-cache/bin/varnishncsa/varnishncsa.c index 928f3e1f..37b2be93 100644 --- a/varnish-cache/bin/varnishncsa/varnishncsa.c +++ b/varnish-cache/bin/varnishncsa/varnishncsa.c @@ -198,11 +198,18 @@ extended_log_format(void *priv, unsigned tag, unsigned fd, unsigned len, unsigne 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);