-2004-11-15 YAMAZAKI Makoto <Yamazaki.Makoto@fujixerox.co.jp>
-
- * src/netrc.c: Fix termination by assertion bug in netrc parsing.
-
2004-05-09 David Fritz <zeroxdf@att.net>
* windows/Makefile.src.bor: Fix broken build rule. Add clean target.
+2004-11-18 Mauro Tortonesi <mauro@deepspace6.net>
+
+ * connect.c: Minor correction to the comment in front of fd_peek.
+
+2004-11-18 Leonid Petrov <nouser@lpetrov.net>
+
+ * retr.c: Fix a timeout problem in fd_read_body when using http_proxy.
+
+2004-11-15 YAMAZAKI Makoto <Yamazaki.Makoto@fujixerox.co.jp>
+
+ * netrc.c: Fix termination by assertion bug in netrc parsing.
+
2004-05-09 David Fritz <zeroxdf@att.net>
* mswindows.c (fake_fork): Pass entire command line to the child
return sock_read (fd, buf, bufsize);
}
-/* The same as xread, but don't actually read the data, just copy it
- instead. */
+/* The same as fd_read, but don't actually read the data, just find out
+ what's the number of bytes available for reading. */
int
fd_peek (int fd, char *buf, int bufsize, double timeout)
}
ret = fd_read (fd, dlbuf, rdsize, tmout);
+ /* when retrieving from http-proxy wget sometimes does not trust the
+ * file length reported by server.
+ * this check is to tell wget not to stubbornly try to read again and
+ * again until another errno code was received. */
+ if ( ret == -1 && errno == ETIMEDOUT && sum_read == toread && toread > 0 )
+ break;
+
if (ret == 0 || (ret < 0 && errno != ETIMEDOUT))
break; /* read error */
else if (ret < 0)