diff options
Diffstat (limited to 'rest-extras/youtube-proxy.c')
-rw-r--r-- | rest-extras/youtube-proxy.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rest-extras/youtube-proxy.c b/rest-extras/youtube-proxy.c index fc824a2..9f9bedb 100644 --- a/rest-extras/youtube-proxy.c +++ b/rest-extras/youtube-proxy.c @@ -150,6 +150,15 @@ youtube_proxy_new_with_auth (const char *developer_key, NULL); } +void +youtube_proxy_set_user_auth (YoutubeProxy *proxy, + const gchar *user_auth) +{ + YoutubeProxyPrivate *priv = proxy->priv; + + priv->user_auth = g_strdup (user_auth); +} + static gchar * _construct_upload_atom_xml (GHashTable *fields) { @@ -166,7 +175,6 @@ _construct_upload_atom_xml (GHashTable *fields) rest_xml_node_add_attr (entry, "xmlns:yt", "http://gdata.youtube.com/schemas/2007"); - g_hash_table_iter_init (&iter, fields); while (g_hash_table_iter_next (&iter, &key, &value)) { @@ -215,6 +223,8 @@ _set_upload_headers (YoutubeProxy *self, if (user_agent) soup_message_headers_append (headers, "User-Agent", user_agent); + g_print ("%s\n", priv->user_auth); + user_auth_header = g_strdup_printf ("GoogleLogin auth=%s", priv->user_auth); soup_message_headers_append (headers, "Authorization", user_auth_header); devkey_header = g_strdup_printf ("key=%s", priv->developer_key); |