summaryrefslogtreecommitdiff
path: root/methods/https.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-05-05 16:03:03 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-05-05 16:03:03 +0200
commit98c934f2723d63d00908803ad47ab1359081ec2d (patch)
treedf7c21f028089b99d63289d784ee5bd23d54d380 /methods/https.cc
parenta298a1dc595c548e6c10b48b8e69d987e5be1c42 (diff)
parenta11f6c973bc0dc226d8953e3edb6333d526c3143 (diff)
Merge remote-tracking branch 'upstream/debian/sid' into debian/sid
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)
{