[sound-juicer/wip/hadess/unescape-proxy-username: 5/6] libjuicer: Unescape proxy user/password info from URL
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer/wip/hadess/unescape-proxy-username: 5/6] libjuicer: Unescape proxy user/password info from URL
- Date: Tue, 10 Dec 2019 12:24:40 +0000 (UTC)
commit 7354a879aface861fdc0e973c6566ebe1245559c
Author: Bastien Nocera <hadess hadess net>
Date: Tue Dec 10 13:20:08 2019 +0100
libjuicer: Unescape proxy user/password info from URL
libjuicer/sj-metadata-getter.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libjuicer/sj-metadata-getter.c b/libjuicer/sj-metadata-getter.c
index 4e850e39..251f1306 100644
--- a/libjuicer/sj-metadata-getter.c
+++ b/libjuicer/sj-metadata-getter.c
@@ -113,6 +113,8 @@ set_http_proxy (SjMetadata *metadata,
const char *host;
guint port;
const char *userinfo;
+ g_autofree char *user = NULL;
+ g_autofree char *password = NULL;
g_auto(GStrv) user_strv = NULL;
uri = gst_uri_from_string (proxy_url);
@@ -149,10 +151,12 @@ set_http_proxy (SjMetadata *metadata,
}
user_strv = g_strsplit (userinfo, ":", 2);
+ user = g_uri_unescape_string (user_strv[0], NULL);
+ password = g_uri_unescape_string (user_strv[1], NULL);
g_object_set (metadata,
- "proxy-username", user_strv[0],
- "proxy-password", user_strv[1],
+ "proxy-username", user,
+ "proxy-password", password,
"proxy-use-authentication", TRUE,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]