freebsd-dev/lib/libfetch
Dag-Erling Smørgrav 08a49957b3 r308996 broke IP literals by assuming that a colon could only occur as
a separator between host and port, and using strchr() to search for it.
Rewrite fetch_resolve() so it handles bracketed literals correctly, and
remove similar code elsewhere to avoid passing unbracketed literals to
fetch_resolve().  Remove #ifdef INET6 so we still parse IP literals
correctly even if we do not have the ability to connect to them.

While there, fix an off-by-one error which caused HTTP 400 errors to be
misinterpreted as redirects.

PR:		217723
MFC after:	1 week
Reported by:	bapt, bz, cem, ngie
2017-03-17 14:18:52 +00:00
..
common.c r308996 broke IP literals by assuming that a colon could only occur as 2017-03-17 14:18:52 +00:00
common.h Add a __printflike() that would have caught the bug fixed in r314396. 2017-03-12 11:54:35 +00:00
fetch.3 Fix bunch of .Xrs. 2016-03-28 16:48:28 +00:00
fetch.c r308996 broke IP literals by assuming that a colon could only occur as 2017-03-17 14:18:52 +00:00
fetch.h Add a file descriptor in struct url for netrc 2017-02-20 00:14:31 +00:00
file.c Call closedir() before returning from fetchListFile() to avoid a leak. 2016-05-25 07:43:32 +00:00
ftp.c Refactor fetch_connect() and fetch_bind() to improve readability and avoid 2016-11-22 13:30:07 +00:00
ftp.errors
http.c r308996 broke IP literals by assuming that a colon could only occur as 2017-03-17 14:18:52 +00:00
http.errors
Makefile First pass through library packaging. 2016-02-04 21:16:35 +00:00
Makefile.depend DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00