diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2022-08-23 12:21:26 +0200 |
---|---|---|
committer | Carlos Garcia Campos <cgarcia@igalia.com> | 2022-08-23 12:21:26 +0200 |
commit | 2696fc8ddfd9237f8844452c6f8a12f6a612b97a (patch) | |
tree | 7d9c1e392f6fa880611b80f3a70fb5e0596c6958 | |
parent | e9e88db893ec503b706fbb2d7fd1d9b35d720859 (diff) | |
download | libsoup-2696fc8ddfd9237f8844452c6f8a12f6a612b97a.tar.gz |
connection: always handle http proxies
We don't want glib to handle http proxy connections for us, so also set
the http application proxy for socket client when using the default
proxy configuration.
Fixes #294
-rw-r--r-- | libsoup/soup-connection.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c index 39be6b08..5deb3d35 100644 --- a/libsoup/soup-connection.c +++ b/libsoup/soup-connection.c @@ -527,13 +527,14 @@ new_socket_client (SoupConnection *conn) G_CALLBACK (re_emit_socket_event), conn, 0); - if (!props->proxy_use_default) { - if (props->proxy_resolver) { - g_socket_client_set_proxy_resolver (client, props->proxy_resolver); - g_socket_client_add_application_proxy (client, "http"); - } else - g_socket_client_set_enable_proxy (client, FALSE); - } + if (!props->proxy_use_default && !props->proxy_resolver) { + g_socket_client_set_enable_proxy (client, FALSE); + } else { + if (props->proxy_resolver) + g_socket_client_set_proxy_resolver (client, props->proxy_resolver); + g_socket_client_add_application_proxy (client, "http"); + } + if (props->io_timeout) g_socket_client_set_timeout (client, props->io_timeout); if (props->local_addr) |