diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-05-07 15:41:54 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-05-07 15:41:54 +0200 |
commit | ff94be47f5dbdcf99cea23fad8c9b992a8e5a67e (patch) | |
tree | dd57b80bf6ecd853fb3c6d5eab041630ecd1e75e /methods/https.cc | |
parent | e39698a485e332742b935292dc4329abf19cbb53 (diff) | |
parent | 98c934f2723d63d00908803ad47ab1359081ec2d (diff) |
Merge branch 'debian/sid' into bugfix/update-progress-reporting
Diffstat (limited to 'methods/https.cc')
-rw-r--r-- | methods/https.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/methods/https.cc b/methods/https.cc index c4aff8f38..e0348ab58 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -325,11 +325,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm) // if we have the file send an if-range query with a range header if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0) { - char Buf[1000]; - sprintf(Buf, "Range: bytes=%li-", (long) SBuf.st_size); - headers = curl_slist_append(headers, Buf); - sprintf(Buf, "If-Range: %s", TimeRFC1123(SBuf.st_mtime).c_str()); - headers = curl_slist_append(headers, Buf); + std::string Buf; + strprintf(Buf, "Range: bytes=%lli-", (long long) SBuf.st_size); + headers = curl_slist_append(headers, Buf.c_str()); + strprintf(Buf, "If-Range: %s", TimeRFC1123(SBuf.st_mtime).c_str()); + headers = curl_slist_append(headers, Buf.c_str()); } else if(Itm->LastModified > 0) { |