mirror of
https://github.com/curl/curl.git
synced 2026-08-24 17:53:33 +03:00
unix-sockets: ignore proxy settings
Fix a recent regression: when a unix-socket is configured, all proxy settings must be ignored. The `via_peer` had been checked correctly, but the connections proxy bits were not cleared. Add test_11_04 to verify. Reported-by: Fabian Keil (libcurl mailing list) Closes #21630
This commit is contained in:
parent
535c575e31
commit
ad549c4641
3 changed files with 22 additions and 6 deletions
|
|
@ -136,3 +136,16 @@ class TestUnix:
|
|||
r.check_response(exitcode=96, http_status=None)
|
||||
assert r.stats[0]['remote_port'] == -1, f'{r.dump_logs()}'
|
||||
assert r.stats[0]['local_port'] == -1, f'{r.dump_logs()}'
|
||||
|
||||
# download http: via Unix socket, ignore proxy args
|
||||
def test_11_04_unix_connect_http(self, env: Env, httpd, uds_faker):
|
||||
curl = CurlClient(env=env)
|
||||
url = f'http://{env.domain1}:{env.http_port}/data.json'
|
||||
xargs = curl.get_proxy_args(proto='http/1.1', use_ip=True, proxys=False)
|
||||
xargs.extend([
|
||||
'--unix-socket', uds_faker.path,
|
||||
])
|
||||
r = curl.http_download(urls=[url], with_stats=True, extra_args=xargs)
|
||||
r.check_response(count=1, http_status=200)
|
||||
assert r.stats[0]['remote_port'] == -1, f'{r.dump_logs()}'
|
||||
assert r.stats[0]['local_port'] == -1, f'{r.dump_logs()}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue