Commit d8e4705d authored by Max Kellermann's avatar Max Kellermann

input/curl: move the range buffer to the stack

From the CURLOPT_RANGE documentation: "The application does not have to keep the string around after setting this option."
parent 338e1f59
......@@ -64,7 +64,6 @@ static const size_t CURL_RESUME_AT = 384 * 1024;
struct CurlInputStream final : public AsyncInputStream, CurlResponseHandler {
/* some buffers which were passed to libcurl, which we have
too free */
char range[32];
CurlSlist request_headers;
CurlRequest *request = nullptr;
......@@ -398,6 +397,7 @@ CurlInputStream::SeekInternal(offset_type new_offset)
/* send the "Range" header */
if (offset > 0) {
char range[32];
#ifdef WIN32
// TODO: what can we use on Windows to format 64 bit?
sprintf(range, "%lu-", (long)offset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment