summaryrefslogtreecommitdiff
path: root/plugins/vfs_curl/vfs_curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/vfs_curl/vfs_curl.c')
-rw-r--r--plugins/vfs_curl/vfs_curl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/vfs_curl/vfs_curl.c b/plugins/vfs_curl/vfs_curl.c
index b0779da7..2574e9fe 100644
--- a/plugins/vfs_curl/vfs_curl.c
+++ b/plugins/vfs_curl/vfs_curl.c
@@ -576,7 +576,9 @@ http_thread_func (void *ctx) {
struct curl_slist *headers = NULL;
curl_easy_reset (curl);
curl_easy_setopt (curl, CURLOPT_URL, fp->url);
- curl_easy_setopt (curl, CURLOPT_USERAGENT, "deadbeef");
+ char ua[100];
+ deadbeef->conf_get_str ("network.http_user_agent", "deadbeef", ua, sizeof (ua));
+ curl_easy_setopt (curl, CURLOPT_USERAGENT, ua);
curl_easy_setopt (curl, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, http_curl_write);
curl_easy_setopt (curl, CURLOPT_WRITEDATA, ctx);
@@ -652,6 +654,7 @@ http_thread_func (void *ctx) {
trace ("curl error:\n%s\n", fp->http_err);
}
deadbeef->mutex_lock (fp->mutex);
+#if 0
if (status == 0 && fp->length < 0 && fp->status != STATUS_ABORTED && fp->status != STATUS_SEEK) {
trace ("vfs_curl: restarting stream\n");
// NOTE: don't do http_stream_reset here - we don't want to cut the ending
@@ -669,6 +672,7 @@ http_thread_func (void *ctx) {
deadbeef->mutex_unlock (fp->mutex);
continue;
}
+#endif
if (fp->status != STATUS_SEEK) {
trace ("vfs_curl: break loop\n");
deadbeef->mutex_unlock (fp->mutex);