aboutsummaryrefslogtreecommitdiffstats
path: root/src/input_curl.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-30 13:06:18 +0100
committerMax Kellermann <max@duempel.org>2008-11-30 13:06:18 +0100
commit422c17ceae89318fa18a608c79ce860e3aff3ee2 (patch)
tree1b793d843c4cc5c956232be027ffc4226b2f8b5f /src/input_curl.c
parent5b089f85fd6cf3139768f450b8c18fe9d9211b73 (diff)
downloadmpd-422c17ceae89318fa18a608c79ce860e3aff3ee2.tar.gz
mpd-422c17ceae89318fa18a608c79ce860e3aff3ee2.tar.xz
mpd-422c17ceae89318fa18a608c79ce860e3aff3ee2.zip
input_curl: send a User-Agent header
Send "Music Player Daemon " + VERSION as the User-Agent request header.
Diffstat (limited to '')
-rw-r--r--src/input_curl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/input_curl.c b/src/input_curl.c
index 2f25a02c2..a97b39e3c 100644
--- a/src/input_curl.c
+++ b/src/input_curl.c
@@ -19,6 +19,7 @@
#include "input_curl.h"
#include "input_stream.h"
#include "dlist.h"
+#include "config.h"
#include <assert.h>
#include <sys/select.h>
@@ -459,6 +460,8 @@ input_curl_easy_init(struct input_stream *is)
if (mcode != CURLM_OK)
return false;
+ curl_easy_setopt(c->easy, CURLOPT_USERAGENT,
+ "Music Player Daemon " VERSION);
curl_easy_setopt(c->easy, CURLOPT_HEADERFUNCTION,
input_curl_headerfunction);
curl_easy_setopt(c->easy, CURLOPT_WRITEHEADER, is);