r4829 - in trunk/varnish-cache/bin: varnishd varnishtest/tests

phk at varnish-cache.org phk at varnish-cache.org
Wed May 19 21:53:52 CEST 2010


Author: phk
Date: 2010-05-19 21:53:52 +0200 (Wed, 19 May 2010)
New Revision: 4829

Added:
   trunk/varnish-cache/bin/varnishtest/tests/r00700.vtc
Modified:
   trunk/varnish-cache/bin/varnishd/cache_http.c
Log:
Allow TAB in the 3rd field of the first line of HTTP requests and responses.

Fixes: #700



Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c	2010-05-19 12:35:36 UTC (rev 4828)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c	2010-05-19 19:53:52 UTC (rev 4829)
@@ -474,7 +474,7 @@
 	q = p;
 	if (!vct_iscrlf(*p)) {
 		for (; !vct_iscrlf(*p); p++)
-			if (vct_isctl(*p))
+			if (!vct_issep(*p) && vct_isctl(*p))
 				return (-1);
 	}
 	hp->hd[h3].b = q;

Added: trunk/varnish-cache/bin/varnishtest/tests/r00700.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/r00700.vtc	                        (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/r00700.vtc	2010-05-19 19:53:52 UTC (rev 4829)
@@ -0,0 +1,16 @@
+# $Id$
+
+test "check TAB in 3 header field"
+
+server s1 {
+	rxreq
+	send "HTTP/1.1 666 foo\tbar\n\nFOO"
+} -start
+
+varnish v1 -vcl+backend {} -start
+
+client c1 {
+	txreq
+	rxresp
+	expect resp.status == 666
+} -run




More information about the varnish-commit mailing list