Author: jmatthew
Date: Tue Feb 5 09:02:19 2008
New Revision: 5562
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5562&view=rev
Log:
2008-02-05 Jonathan Matthew <[EMAIL PROTECTED]>
* plugins/audioscrobbler/rb-audioscrobbler.c:
(rb_audioscrobbler_perform):
* plugins/audioscrobbler/rb-lastfm-source.c: (rb_lastfm_perform):
Add a user-agent header to our HTTP requests. Some proxies behave
badly without one. Fixes #514254.
Modified:
trunk/ChangeLog
trunk/plugins/audioscrobbler/rb-audioscrobbler.c
trunk/plugins/audioscrobbler/rb-lastfm-source.c
Modified: trunk/plugins/audioscrobbler/rb-audioscrobbler.c
==============================================================================
--- trunk/plugins/audioscrobbler/rb-audioscrobbler.c (original)
+++ trunk/plugins/audioscrobbler/rb-audioscrobbler.c Tue Feb 5 09:02:19 2008
@@ -61,6 +61,8 @@
#define SCROBBLER_URL "http://post.audioscrobbler.com/"
#define SCROBBLER_VERSION "1.1"
+#define USER_AGENT "Rhythmbox/" VERSION
+
#define SCROBBLER_DATE_FORMAT "%Y%%2D%m%%2D%d%%20%H%%3A%M%%3A%S"
#define EXTRA_URI_ENCODE_CHARS "&+"
@@ -798,6 +800,7 @@
SoupMessage *msg;
msg = soup_message_new (post_data == NULL ? "GET" : "POST", url);
+ soup_message_add_header (msg->request_headers, "User-Agent",
USER_AGENT);
if (post_data != NULL) {
rb_debug ("Submitting to Audioscrobbler: %s", post_data);
Modified: trunk/plugins/audioscrobbler/rb-lastfm-source.c
==============================================================================
--- trunk/plugins/audioscrobbler/rb-lastfm-source.c (original)
+++ trunk/plugins/audioscrobbler/rb-lastfm-source.c Tue Feb 5 09:02:19 2008
@@ -75,6 +75,7 @@
#define LAST_FM_NO_COVER_IMAGE
"http://static.last.fm/depth/catalogue/noimage/cover_med.gif"
+#define USER_AGENT "Rhythmbox/" VERSION
static void rb_lastfm_source_class_init (RBLastfmSourceClass *klass);
static void rb_lastfm_source_init (RBLastfmSource *source);
@@ -728,6 +729,7 @@
{
SoupMessage *msg;
msg = soup_message_new ("GET", url);
+ soup_message_add_header (msg->request_headers, "User-Agent",
USER_AGENT);
if (msg == NULL)
return;
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list
Want to limit the commits to a few modules? Go to above URL, log in to edit
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development
mailing list. Email [EMAIL PROTECTED] if interested.