From 422c17ceae89318fa18a608c79ce860e3aff3ee2 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Sun, 30 Nov 2008 13:06:18 +0100
Subject: input_curl: send a User-Agent header

Send "Music Player Daemon " + VERSION as the User-Agent request
header.
---
 src/input_curl.c | 3 +++
 1 file changed, 3 insertions(+)

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);
-- 
cgit v1.2.3