History log of /freebsd-10-stable/lib/libfetch/http.c
Revision Date Author Comments
# 315904 24-Mar-2017 des

MFH (r313974,r314596): open .netrc early in case we want to drop privs
MFH (r314396,r315143): fix a crash caused by an incorrect format string
MFH (r314701): fix handling of 416 errors when requesting a range
MFH (r315455): fix parsing of IP literals (square brackets)

PR: 212065, 217723


# 311864 10-Jan-2017 des

MFH (r301027): fix 307 / 308 redirects
MFH (r310823): fix multi-line CONNECT responses

PR: 112515 173451 194483 209546


# 311863 10-Jan-2017 des

MFH (r267371, r297754, r299520): nits and style


# 295692 17-Feb-2016 des

MFH (r295536): fix double-free error when SSL connection fails

PR: 206774
Submitted by: Christian Heckendorf <heckendorfc@gmail.com>
Approved by: re (glebius)


# 294194 16-Jan-2016 des

MFH (r280630): remove all traces of SSLv2 support
MFH (r285141): remove unused variable
MFH (r288217): correctly check return value from getaddrinfo(3)
MFH (r289419): fix bugs in HTTPS tunnelling
MFH (r289420): use fopen()'s "e" mode instead of fcntl for close-on-exec
MFH (r291453, r291461): use .netrc for http servers and proxies
MFH (r292330, r292332): reset bufpos to 0 after refilling in chunked mode

PR: 194483 199801 193740 204771


# 284643 20-Jun-2015 dim

MFC r284346:

Fix the following clang 3.7.0 warnings in lib/libfetch/http.c:

lib/libfetch/http.c:1628:26: error: address of array 'purl->user'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.user = purl->user ?
~~~~~~^~~~ ~
lib/libfetch/http.c:1630:30: error: address of array 'purl->pwd'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.password = purl->pwd?
~~~~~~^~~~
lib/libfetch/http.c:1657:25: error: address of array 'url->user'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.user = url->user ?
~~~~~^~~~ ~
lib/libfetch/http.c:1659:29: error: address of array 'url->pwd'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.password = url->pwd ?
~~~~~^~~ ~
lib/libfetch/http.c:1669:25: error: address of array 'url->user'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.user = url->user ?
~~~~~^~~~ ~
lib/libfetch/http.c:1671:29: error: address of array 'url->pwd'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.password = url->pwd ?
~~~~~^~~ ~

Since url->user and url->pwd are arrays, they can never be NULL, so the
checks can be removed.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D2673


# 270460 24-Aug-2014 des

MFH (r267127): don't send User-Agent if HTTP_USER_AGENT is empty


# 268900 19-Jul-2014 bapt

MFC: r267131, r267132, r267133, r268493, r268671

Use NULL instead of 0 (Patch by Sascha Wildner <saw at online.de> for Dragonfly)
Remove unnecessary semicolons (Patch by Sascha Wildner <saw at online.de> for Dragonfly)
Add support for arbitrary http requests [1]
Support EAGAIN in fetch_writev

Submitted by: Alex Hornung <alex at alexhornung.com> [1]
Reviewed by: des


# 263325 18-Mar-2014 bdrewery

MFC r263021:

Support Last-Modified behind proxies which return UTC instead of GMT.


# 262560 27-Feb-2014 des

MFH (r260904): fix format string
MFH (r261230, r261263): fix buffering issues
MFH (r261284): bump copyright


# 284643 20-Jun-2015 dim

MFC r284346:

Fix the following clang 3.7.0 warnings in lib/libfetch/http.c:

lib/libfetch/http.c:1628:26: error: address of array 'purl->user'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.user = purl->user ?
~~~~~~^~~~ ~
lib/libfetch/http.c:1630:30: error: address of array 'purl->pwd'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.password = purl->pwd?
~~~~~~^~~~
lib/libfetch/http.c:1657:25: error: address of array 'url->user'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.user = url->user ?
~~~~~^~~~ ~
lib/libfetch/http.c:1659:29: error: address of array 'url->pwd'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.password = url->pwd ?
~~~~~^~~ ~
lib/libfetch/http.c:1669:25: error: address of array 'url->user'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.user = url->user ?
~~~~~^~~~ ~
lib/libfetch/http.c:1671:29: error: address of array 'url->pwd'
will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
aparams.password = url->pwd ?
~~~~~^~~ ~

Since url->user and url->pwd are arrays, they can never be NULL, so the
checks can be removed.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D2673


# 270460 24-Aug-2014 des

MFH (r267127): don't send User-Agent if HTTP_USER_AGENT is empty


# 268900 19-Jul-2014 bapt

MFC: r267131, r267132, r267133, r268493, r268671

Use NULL instead of 0 (Patch by Sascha Wildner <saw at online.de> for Dragonfly)
Remove unnecessary semicolons (Patch by Sascha Wildner <saw at online.de> for Dragonfly)
Add support for arbitrary http requests [1]
Support EAGAIN in fetch_writev

Submitted by: Alex Hornung <alex at alexhornung.com> [1]
Reviewed by: des


# 263325 18-Mar-2014 bdrewery

MFC r263021:

Support Last-Modified behind proxies which return UTC instead of GMT.


# 262560 27-Feb-2014 des

MFH (r260904): fix format string
MFH (r261230, r261263): fix buffering issues
MFH (r261284): bump copyright