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

Loop till we have everything.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@514 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a4a89117
......@@ -140,11 +140,12 @@ http_Read(struct http *hp, int fd, void *p, unsigned len)
b += u;
len -= u;
}
if (len > 0) {
while (len > 0) {
i = read(fd, b, len);
if (i < 0)
if (i <= 0)
return (i);
u += i;
len -= u;
}
return (u);
}
......
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