r514 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Thu Jul 20 11:42:47 CEST 2006
Author: phk
Date: 2006-07-20 11:42:47 +0200 (Thu, 20 Jul 2006)
New Revision: 514
Modified:
trunk/varnish-cache/bin/varnishd/cache_http.c
Log:
Loop till we have everything.
Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-07-20 09:29:45 UTC (rev 513)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-07-20 09:42:47 UTC (rev 514)
@@ -140,11 +140,12 @@
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);
}
More information about the varnish-commit
mailing list