r5687 - trunk/varnish-cache/bin/varnishtest
phk at varnish-cache.org
phk at varnish-cache.org
Wed Jan 5 13:33:59 CET 2011
Author: phk
Date: 2011-01-05 13:33:58 +0100 (Wed, 05 Jan 2011)
New Revision: 5687
Modified:
trunk/varnish-cache/bin/varnishtest/vtc_http.c
Log:
Don't assert, report chunk len trouble the usual way.
Modified: trunk/varnish-cache/bin/varnishtest/vtc_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_http.c 2011-01-05 12:10:11 UTC (rev 5686)
+++ trunk/varnish-cache/bin/varnishtest/vtc_http.c 2011-01-05 12:33:58 UTC (rev 5687)
@@ -399,13 +399,19 @@
while (hp->rxbuf[hp->prxbuf - 1] != '\n');
vtc_dump(hp->vl, 4, "len", hp->rxbuf + l, -1);
i = strtoul(hp->rxbuf + l, &q, 16);
+ if ((q == hp->rxbuf + l) ||
+ (*q != '\0' && !vct_islws(*q))) {
+ vtc_log(hp->vl, 0, "chunked fail %02x @ %d",
+ *q, q - (hp->rxbuf + l));
+ }
assert(q != hp->rxbuf + l);
assert(*q == '\0' || vct_islws(*q));
hp->prxbuf = l;
if (i > 0) {
ll += i;
http_rxchar(hp, i);
- vtc_dump(hp->vl, 4, "chunk", hp->rxbuf + l, -1);
+ vtc_dump(hp->vl, 4, "chunk",
+ hp->rxbuf + l, -1);
}
l = hp->prxbuf;
http_rxchar(hp, 2);
More information about the varnish-commit
mailing list