From 52eb761acc46942dc05d7afe1a6a1da251cd2810 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 29 Jun 2017 15:22:39 -0400 Subject: [PATCH] souphttpsrc: Allow any type of proxy Currently we only allowed HTTP proxy. Don't filter for the scheme, just check if it looks like an URI. Soup will warn if the URI is invalid or if proxy protocol is not supported. This enables using SOCKS 4/5 which is directly implemented into GIO. https://bugzilla.gnome.org/show_bug.cgi?id=783012 --- ext/soup/gstsouphttpsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index 5decb92230..f603ff5ab8 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -2098,7 +2098,7 @@ gst_soup_http_src_set_proxy (GstSoupHTTPSrc * src, const gchar * uri) if (uri == NULL || *uri == '\0') return TRUE; - if (g_str_has_prefix (uri, "http://")) { + if (g_strstr_len (uri, -1, "://")) { src->proxy = soup_uri_new (uri); } else { gchar *new_uri = g_strconcat ("http://", uri, NULL);