summaryrefslogtreecommitdiff
path: root/methods/https.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-04-28 12:50:47 +0200
committerMichael Vogt <mvo@debian.org>2014-04-28 12:50:47 +0200
commit77efe478cc59fe205c35036bae8c0d5e0e6913d7 (patch)
tree292ddf183b3f38c299bd6614fbd48585aa6d00b2 /methods/https.cc
parent814e1b8d623cb1e6b03c79fcdab6b20754c57038 (diff)
parent038e721ad2557fd517eae4b102cd36080f4ee6e3 (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: po/vi.po
Diffstat (limited to 'methods/https.cc')
-rw-r--r--methods/https.cc10
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)
{