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.
This commit is contained in:
Max Kellermann
2017-10-24 21:43:39 +02:00
parent ff162b5a03
commit 1de19b921a
2 changed files with 4 additions and 1 deletions

2
NEWS
View File

@@ -1,4 +1,6 @@
ver 0.20.12 (not yet released)
* input
- curl: fix seeking
ver 0.20.11 (2017/10/18)
* storage

View File

@@ -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