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) ...@@ -140,11 +140,12 @@ http_Read(struct http *hp, int fd, void *p, unsigned len)
b += u; b += u;
len -= u; len -= u;
} }
if (len > 0) { while (len > 0) {
i = read(fd, b, len); i = read(fd, b, len);
if (i < 0) if (i <= 0)
return (i); return (i);
u += i; u += i;
len -= u;
} }
return (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