the transaction.
Fixes #387
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3500
d4fa192b-c00b-0410-8231-
f00ffab90ce4
/* If we didn't succeed, add to buffer, try again */
if (q == NULL || q == buf || *q != '\n') {
- xxxassert(be > bp);
+ if (bp >= be)
+ return (-1);
/*
* The semantics we need here is "read until you have
* received at least one character, but feel free to
--- /dev/null
+# $Id$
+
+test "Regression test for #387: too long chunk header"
+
+server s1 {
+ rxreq
+ send "HTTP/1.1 200 Ok\r\n"
+ send "Transfer-encoding: chunked\r\n"
+ send "\r\n"
+ send "004\r\n1234\r\n"
+ send "000000000000000000001\r\n@\r\n"
+ send "00000000\r\n"
+} -start
+
+varnish v1 -vcl+backend {} -start
+
+client c1 {
+ txreq
+ rxresp
+ expect resp.status == 503
+} -run
+