r5334 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Wed Sep 29 10:40:37 CEST 2010


Author: phk
Date: 2010-09-29 10:40:35 +0200 (Wed, 29 Sep 2010)
New Revision: 5334

Modified:
   trunk/varnish-cache/bin/varnishd/cache_vary.c
Log:
Add a limited workaround for vary headers having double colons.

In general the "be liberal in what you accept" is a good thing, but
I am not going to be liberal about anything that could cause us to
return wrong content.

The truly consistent thing to do would be to error the fetch, but that
is a bit on the harsh-side for this specific cornercase, so I have
added a test to ignore the first character of the vary header, if it
is a colon.

Fixes:	#763



Modified: trunk/varnish-cache/bin/varnishd/cache_vary.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vary.c	2010-09-29 08:31:36 UTC (rev 5333)
+++ trunk/varnish-cache/bin/varnishd/cache_vary.c	2010-09-29 08:40:35 UTC (rev 5334)
@@ -82,6 +82,10 @@
 	sbh = vsb_newauto();
 	AN(sbh);
 
+	if (*v == ':') {
+		WSP(sp, SLT_Error, "Vary header had extra ':', fix backend");
+		v++;
+	}
 	for (p = v; *p; p++) {
 
 		/* Find next header-name */




More information about the varnish-commit mailing list