[master] bb9d787 Don't add a trailing dash to URL if missing path.

Lasse Karstensen lkarsten at varnish-software.com
Tue Sep 2 12:42:07 CEST 2014


commit bb9d78797a8e163f533ccaea3686b5340a19987d
Author: Lasse Karstensen <lkarsten at varnish-software.com>
Date:   Tue Sep 2 12:29:47 2014 +0200

    Don't add a trailing dash to URL if missing path.
    
    Adding a dash if missing the path component does not make sense.
    
    Related bug:	#1584

diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index 685d869..59c1918 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -300,7 +300,7 @@ format_requestline(const struct format *format)
 		AZ(vsb_fcat(CTX.vsb, &CTX.frag[F_host], NULL));
 	} else
 		AZ(VSB_cat(CTX.vsb, "http://localhost"));
-	AZ(vsb_fcat(CTX.vsb, &CTX.frag[F_U], "-"));
+	AZ(vsb_fcat(CTX.vsb, &CTX.frag[F_U], NULL));
 	AZ(vsb_fcat(CTX.vsb, &CTX.frag[F_q], ""));
 	AZ(VSB_putc(CTX.vsb, ' '));
 	AZ(vsb_fcat(CTX.vsb, &CTX.frag[F_H], "HTTP/1.0"));



More information about the varnish-commit mailing list