From 1de19b921a0be8f658c24b56befc85597204d9a7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 24 Oct 2017 21:43:39 +0200 Subject: [PATCH] input/curl: call StartRequest() after setting CURLOPT_RANGE It's not possible to set CURL options after curl_easy_perform(), and thus the CURLOPT_RANGE had no effect. --- NEWS | 2 ++ src/input/plugins/CurlInputPlugin.cxx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4e704a3ef..88855d969 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.20.12 (not yet released) +* input + - curl: fix seeking ver 0.20.11 (2017/10/18) * storage diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx index 679cc7d72..ffffb34b5 100644 --- a/src/input/plugins/CurlInputPlugin.cxx +++ b/src/input/plugins/CurlInputPlugin.cxx @@ -409,7 +409,6 @@ CurlInputStream::SeekInternal(offset_type new_offset) } InitEasy(); - StartRequest(); /* send the "Range" header */ @@ -423,6 +422,8 @@ CurlInputStream::SeekInternal(offset_type new_offset) #endif request->SetOption(CURLOPT_RANGE, range); } + + StartRequest(); } void