apk-tools/libfetch
Timo Teräs acca5cbff0 libfetch: fix connection pooling for proxied http/https requests
The connection pooling was broken in two ways:

 1. The original URL was always used as the connection pool URL,
    resulting in duplicate connections to the proxy for http URLs
    (each http URL would get separate proxy connection)

 2. The cache_url stored was always the socket level connect URL.
    In case of HTTPS, the lookup was done done with the real URL,
    but the proxy URL was stored as the "cache URL". Thus HTTPS
    CONNECT connections were never re-used.

This fixes the code with following logic:

 1. The cache key url is the real URL when no-proxy, or when HTTPS
    with proxy (the socket is connected to proxy, but logically it
    is connected to the real URL due to HTTP CONNECT request).
    And for HTTP with proxy, it's the proxy URL so same proxy
    connection can be reused for all requests going through it.

 2. fetch_connect() now gets cache key URL separately, and it always
    gets the same value as the fetch_cache_get() calls.
2021-01-19 16:42:38 +02:00
..
Makefile add script to autogenerate help from man pages 2020-05-06 13:05:19 +03:00
common.c libfetch: fix connection pooling for proxied http/https requests 2021-01-19 16:42:38 +02:00
common.h libfetch: fix connection pooling for proxied http/https requests 2021-01-19 16:42:38 +02: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 libfetch: Increase URL password length 2021-01-08 10:55:37 +02:00
file.c libfetch: remove unwanted code conditionals 2017-10-05 16:59:14 +03:00
ftp.c libfetch: fix connection pooling for proxied http/https requests 2021-01-19 16:42:38 +02:00
ftp.errors import libfetch-2.38 from NetBSD 2017-10-05 16:58:09 +03:00
http.c libfetch: fix connection pooling for proxied http/https requests 2021-01-19 16:42:38 +02:00
http.errors import libfetch-2.38 from NetBSD 2017-10-05 16:58:09 +03:00
meson.build build: make sure to use helper scripts from git tree and not system 2020-10-09 16:09:19 +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