apk-tools/libfetch
Timo Teräs 271047cc93 libfetch: support TCP_CORK
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.
2020-02-18 15:36:01 +02:00
..
Makefile libfetch: improve openssl/libressl compatibility 2017-10-06 13:25:27 +03:00
common.c libfetch: support OpenSSL 2018-01-31 20:04:46 +00:00
common.h libfetch: improve openssl/libressl compatibility 2017-10-06 13:25:27 +03:00
errlist.sh import libfetch-2.38 from NetBSD 2017-10-05 16:58:09 +03:00
fetch.3 import libfetch-2.38 from NetBSD 2017-10-05 16:58:09 +03:00
fetch.c libfetch: remove unwanted code conditionals 2017-10-05 16:59:14 +03:00
fetch.cat3 import libfetch-2.38 from NetBSD 2017-10-05 16:58:09 +03:00
fetch.h import libfetch-2.38 from NetBSD 2017-10-05 16:58:09 +03:00
file.c libfetch: remove unwanted code conditionals 2017-10-05 16:59:14 +03:00
ftp.c libfetch: do not give out user/hostname as ftp anonymous password 2018-09-05 10:32:00 +03:00
ftp.errors import libfetch-2.38 from NetBSD 2017-10-05 16:58:09 +03:00
http.c libfetch: support TCP_CORK 2020-02-18 15:36:01 +02:00
http.errors import libfetch-2.38 from NetBSD 2017-10-05 16:58:09 +03:00
openssl-compat.c libfetch: improve openssl/libressl compatibility 2017-10-06 13:25:27 +03:00
openssl-compat.h libfetch: improve openssl/libressl compatibility 2017-10-06 13:25:27 +03:00