diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2021-06-08 10:57:06 +0200 |
---|---|---|
committer | Günther Wagner <info@gunibert.de> | 2021-11-04 21:39:51 +0100 |
commit | e55578092e347a4fce887d5a278dc007204fa5cd (patch) | |
tree | 8e220e393dc4451708e0384c3ef5617b0ff989cb /rest-extras | |
parent | 01b71d516e5e6ababa51259e1e419b4432abec2f (diff) | |
download | librest-e55578092e347a4fce887d5a278dc007204fa5cd.tar.gz |
Use GUri instead of SoupURI
Diffstat (limited to 'rest-extras')
-rw-r--r-- | rest-extras/flickr-proxy.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/rest-extras/flickr-proxy.c b/rest-extras/flickr-proxy.c index 3342a4d..7726359 100644 --- a/rest-extras/flickr-proxy.c +++ b/rest-extras/flickr-proxy.c @@ -304,13 +304,13 @@ flickr_proxy_build_login_url (FlickrProxy *proxy, const char *frob, const char *perms) { - SoupURI *uri; + GUri *uri; GHashTable *params; char *sig, *s; + char *query; g_return_val_if_fail (FLICKR_IS_PROXY (proxy), NULL); - uri = soup_uri_new ("http://flickr.com/services/auth/"); params = g_hash_table_new (g_str_hash, g_str_equal); g_hash_table_insert (params, "api_key", proxy->priv->api_key); @@ -321,14 +321,23 @@ flickr_proxy_build_login_url (FlickrProxy *proxy, sig = flickr_proxy_sign (proxy, params); g_hash_table_insert (params, "api_sig", sig); + query = soup_form_encode_hash (params); - soup_uri_set_query_from_form (uri, params); + uri = g_uri_build (G_URI_FLAGS_ENCODED, + "http", + NULL, + "flickr.com", + -1, + "services/auth/", + query, + NULL); - s = soup_uri_to_string (uri, FALSE); + s = g_uri_to_string (uri); + g_free (query); g_free (sig); g_hash_table_destroy (params); - soup_uri_free (uri); + g_uri_unref (uri); return s; } |