aboutsummaryrefslogtreecommitdiffstats
path: root/libfetch/http.c
Commit message (Collapse)AuthorAgeFilesLines
* libfetch: minor HTTP handling improvementAlexander Wauck2020-03-251-5/+2
| | | | | | The recent TCP_CORK change missed this bit of code. This change should improve performance a bit when making HTTP requests by calling http_cmd only once instead of three times.
* libfetch: support TCP_CORKTimo Teräs2020-02-181-23/+22
| | | | | | | | | | | | | | | | | | | Unfortunately libfetch operates on raw sockets and is sending each HTTP request line using separate syscall which causes the HTTP request to be sent as multiple packets over the wire in most configurations. This is not good for performance, but can also cause subtle breakage if there's DPI firewall that does not get the Host header. Incidentally, it seems that on BSDs libfetch already sets TCP_NOPUSH optimize the packetization. This commit adds same logic for using TCP_CORK if available. When using TCP_CORK there is no requirement to set TCP_NODELAY as uncorking will also cause immediate send. Keep TCP_NODELAY in the fallback codepaths. Long term, it might make sense to replace or rewrite libfetch to use application level buffering.
* fix strncpy bounds errorsTimo Teräs2019-02-131-2/+2
| | | | | | error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation] Based on patch by Elan Ruusamäe <glen@delfi.ee>
* libfetch: add option to set "Cache-Control: no-cache"Timo Teräs2018-01-031-1/+4
| | | | ref #8161
* libfetch: honor https_proxy variable for httpsTimo Teräs2018-01-031-11/+30
| | | | fixes #8160
* libfetch: remove unwanted code conditionalsTimo Teräs2017-10-051-16/+0
|
* build and use bundled libfetch nativelyTimo Teräs2017-10-051-22/+0
|
* import libfetch-2.38 from NetBSDTimo Teräs2017-10-051-0/+1552
ftp://ftp.fu-berlin.de/unix/NetBSD/packages/current-src/pkgsrc/net/libfetch/files libfetch comes (at least) in netbsd and freebsd flavors which differing functionality. Alpine and Arch package netbsd one, but it's not widely packaged across other distributions. We need NetBSD version as it does not use funopen(3) which is not supported in musl, and supports connection pooling. FreeBSD seems to be the orignal and better maintained version with support for SSL CAs, client certificate authentication, proxy authentication, and improved http redirect handling. So this imports NetBSD version, and future commits will pick up the needed improvements from FreeBSD tree. Incidentally, this also fixes #7857 and likes for good.