[libsoup/libsoup-3-0] connection: always handle http proxies
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/libsoup-3-0] connection: always handle http proxies
- Date: Fri, 2 Sep 2022 10:20:30 +0000 (UTC)
commit 904199f114445c6c182e4a8db2cd849fe9529bc4
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Tue Aug 23 12:21:26 2022 +0200
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
libsoup/soup-connection.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c
index 95bc737d..dd2b2f30 100644
--- a/libsoup/soup-connection.c
+++ b/libsoup/soup-connection.c
@@ -514,13 +514,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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]