r5506 - in trunk/varnish-cache: bin/varnishtest/tests include

phk at varnish-cache.org phk at varnish-cache.org
Thu Nov 4 12:03:02 CET 2010


Author: phk
Date: 2010-11-04 12:03:01 +0100 (Thu, 04 Nov 2010)
New Revision: 5506

Added:
   trunk/varnish-cache/bin/varnishtest/tests/r00789.vtc
Modified:
   trunk/varnish-cache/include/http_headers.h
Log:
Do not filter out Content-Range headers in pass.

Fixes: #789



Added: trunk/varnish-cache/bin/varnishtest/tests/r00789.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/r00789.vtc	                        (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/r00789.vtc	2010-11-04 11:03:01 UTC (rev 5506)
@@ -0,0 +1,21 @@
+# $Id$
+
+test "pass should not filter Content-Range header"
+
+server s1 {
+	rxreq
+	expect req.http.range == "bytes=1-1"
+	txresp -status 206 -hdr "Content-Range: bytes 1-1/20" -body "F"
+
+} -start
+
+
+varnish v1 -vcl+backend { sub vcl_recv {return(pass);} } -start
+
+client c1 {
+	txreq -hdr "Range: bytes=1-1"
+	rxresp
+	expect resp.status == 206
+	expect resp.bodylen == 1
+	expect resp.http.content-range == "bytes 1-1/20"
+} -run

Modified: trunk/varnish-cache/include/http_headers.h
===================================================================
--- trunk/varnish-cache/include/http_headers.h	2010-11-04 10:41:13 UTC (rev 5505)
+++ trunk/varnish-cache/include/http_headers.h	2010-11-04 11:03:01 UTC (rev 5506)
@@ -58,7 +58,7 @@
 HTTPH("Accept-Charset",		H_Accept_Charset,	1, 0, 0,										0, 0)	/* RFC2616 14.2 */
 HTTPH("Accept-Encoding",	H_Accept_Encoding,	1, 0, 0,										0, 0)	/* RFC2616 14.3 */
 HTTPH("Accept-Language",	H_Accept_Language,	1, 0, 0,										0, 0)	/* RFC2616 14.4 */
-HTTPH("Accept-Ranges",		H_Accept_Ranges,	2, 3, HTTPH_R_PASS | HTTPH_A_PASS | HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.5 */
+HTTPH("Accept-Ranges",		H_Accept_Ranges,	2, 3, 				    HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.5 */
 HTTPH("Age",			H_Age,			2, 0,						    HTTPH_A_INS,			0, 0)	/* RFC2616 14.6 */
 HTTPH("Allow",			H_Allow,		2, 0, 0,										0, 0)	/* RFC2616 14.7 */
 HTTPH("Authorization",		H_Authorization,	1, 0, 0,										0, 0)	/* RFC2616 14.8 */
@@ -69,7 +69,7 @@
 HTTPH("Content-Length",		H_Content_Length,	2, 2,				    HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.13 */
 HTTPH("Content-Location",	H_Content_Location,	2, 0, 0,										0, 0)	/* RFC2616 14.14 */
 HTTPH("Content-MD5",		H_Content_MD5,		2, 0, 0,										0, 0)	/* RFC2616 14.15 */
-HTTPH("Content-Range",		H_Content_Range,	2, 3, HTTPH_R_PASS | HTTPH_A_PASS | HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.16 */
+HTTPH("Content-Range",		H_Content_Range,	2, 3,				    HTTPH_R_FETCH | HTTPH_A_INS,			0, 0)	/* RFC2616 14.16 */
 HTTPH("Content-Type",		H_Content_Type,		2, 0, 0,										0, 0)	/* RFC2616 14.17 */
 HTTPH("Date",			H_Date,			2, 0,								HTTPH_A_DELIVER,	0, 0)	/* RFC2616 14.18 */
 HTTPH("ETag",			H_ETag,			2, 0, 0,										0, 0)	/* RFC2616 14.19 */




More information about the varnish-commit mailing list