diff --git a/src/http.c b/src/http.c index 1d48c6f3..69da96e5 100644 --- a/src/http.c +++ b/src/http.c @@ -386,10 +386,13 @@ https_client_request_impl(struct http_client_ctx *ctx) curl_easy_setopt(curl, CURLOPT_POSTFIELDS, ctx->output_body); curl_easy_setopt(curl, CURLOPT_TIMEOUT, HTTP_CLIENT_TIMEOUT); - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_request_cb); curl_easy_setopt(curl, CURLOPT_WRITEDATA, ctx); + // Artwork and playlist requests might require redirects + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 5); + /* Make request */ DPRINTF(E_INFO, L_HTTP, "Making request for %s\n", ctx->url); @@ -416,7 +419,6 @@ http_client_request(struct http_client_ctx *ctx) { if (strncmp(ctx->url, "http:", strlen("http:")) == 0) return http_client_request_impl(ctx); - #ifdef HAVE_LIBCURL if (strncmp(ctx->url, "https:", strlen("https:")) == 0) return https_client_request_impl(ctx);