]> err.no Git - varnish/commitdiff
Fixed: Correctly logging "-" when there is no User-Agent or Referer.
authorandersb <andersb@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 24 Sep 2006 17:14:28 +0000 (17:14 +0000)
committerandersb <andersb@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 24 Sep 2006 17:14:28 +0000 (17:14 +0000)
Note: Still builds with warning.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1123 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishncsa/varnishncsa.c

index 928f3e1f4a42836b60255dffd5beaf3c2d76351e..37b2be939d27ff49f85905c7edbaa72eda2219ac 100644 (file)
@@ -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);