--- /dev/null
+# $Id$
+
+test "Regression test for #255: Segfault on header token separation"
+
+server s1 {
+ rxreq
+ txresp \
+ -hdr "Date: Thu, 19 Jun 2008 21:14:49 GMT" \
+ -hdr "Content-Length: 7" \
+ -hdr "Expires: Thu, 19 Jun 2008 21:14:49 GMT" \
+ -hdr "Last-Modified: Sun, 27 Nov 2005 05:41:47 GMT" \
+ -hdr "Cache-Control: max-age =0" \
+ -body "012345\n"
+}
+
+varnish v1 -vcl+backend { sub vcl_recv {set req.backend = s1;} } -start
+
+server s1 -start
+
+client c1 {
+ txreq -url "/"
+ rxresp
+ expect resp.status == 200
+ expect resp.http.X-Varnish == "1001"
+ expect resp.http.Cache-Control == "max-age =0"
+}
+
+client c1 -run