Commit f5e87c21 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't fill more than half the workspace with received data, we need to

have space for composing the reply as well.

Without this fix, the entire workspace could be filled with pipelined
requests and we would have no space to compose the reply.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@571 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8fe824aa
......@@ -409,7 +409,11 @@ http_read_f(int fd, short event, void *arg)
(void)event;
l = hp->e - hp->v;
l = (hp->e - hp->s) / 2;
if (l < hp->v - hp->s)
l = 0;
else
l -= hp->v - hp->s;
if (l <= 1) {
VSL(SLT_HttpError, fd, "Received too much");
VSLR(SLT_HttpGarbage, fd, hp->s, hp->v);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment