1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00
freebsd/lib/libfetch
Dag-Erling Smørgrav 9c1ca3a1dd r261230 broke the cases where the amount of data to be read is not
known in advance, or where the caller doesn't care and just keeps
reading until it hits EOF.

In fetch_read(): the socket is non-blocking, so read() will return 0
on EOF, and -1 (errno == EAGAIN) when the connection is still open but
there is no data waiting.  In the first case, we should immediately
return 0.  The EINTR case was also broken, although not in a way that
matters.

In fetch_writev(): use timersub() and timercmp() as in fetch_read().

In http_fillbuf(): set errno to a sensible value when an invalid chunk
header is encountered.

In http_readfn(): as in fetch_read(), a zero return from down the
stack indicates EOF, not an error.  Furthermore, when io->error is
EINTR, clear it (but no errno) before returning so the caller can
retry after dealing with the interrupt.

MFC after:	3 days
2014-01-29 12:48:19 +00:00
..
common.c r261230 broke the cases where the amount of data to be read is not 2014-01-29 12:48:19 +00:00
common.h Solve http buffering issues and hangs once and for all (hopefully!) by 2014-01-28 12:48:17 +00:00
fetch.3 Include an Accept header in requests. 2013-07-30 13:07:55 +00:00
fetch.c Fix -Wunsequenced warning. 2013-06-29 15:51:27 +00:00
fetch.h
file.c Adding missing return statements during error conditions. 2012-09-14 12:15:13 +00:00
ftp.c
ftp.errors
http.c r261230 broke the cases where the amount of data to be read is not 2014-01-29 12:48:19 +00:00
http.errors Don't deny non-temporary redirects if the -A option is set (per 2012-10-22 03:00:10 +00:00
Makefile Use libmd if and only if OpenSSL is not available. 2012-09-14 13:00:43 +00:00