From ea54214002c09eeb4dd498d97a564471ec9993c5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Sep 2011 10:09:00 +0200 Subject: reorder includes: add if needed and include it at first --- methods/https.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'methods/https.cc') diff --git a/methods/https.cc b/methods/https.cc index fc649d6c2..45bd2a367 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -10,6 +10,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include @@ -25,12 +27,11 @@ #include #include #include -#include #include #include "config.h" #include "https.h" - +#include /*}}}*/ using namespace std; -- cgit v1.2.3 From 650faab01603caac04494d54cf6b10a65c00ea13 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Sep 2011 17:46:48 +0200 Subject: Support large files in the complete toolset. Indexes of this size are pretty unlikely for now, but we need it for deb packages which could become bigger than 4GB now (LP: #815895) --- methods/https.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'methods/https.cc') diff --git a/methods/https.cc b/methods/https.cc index 45bd2a367..06a0e285a 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -52,7 +52,7 @@ HttpsMethod::progress_callback(void *clientp, double dltotal, double dlnow, { HttpsMethod *me = (HttpsMethod *)clientp; if(dltotal > 0 && me->Res.Size == 0) { - me->Res.Size = (unsigned long)dltotal; + me->Res.Size = (unsigned long long)dltotal; me->URIStart(me->Res); } return 0; -- cgit v1.2.3 From 472ff00ef2e48383805d281c6364ec27839e3f4d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 19 Sep 2011 19:14:19 +0200 Subject: use forward declaration in headers if possible instead of includes --- methods/https.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'methods/https.cc') diff --git a/methods/https.cc b/methods/https.cc index 06a0e285a..e70206dfb 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -17,6 +17,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From db1f14695ce3e5e49e05f67f3ae2225b6706ec66 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 20 Sep 2011 18:21:21 +0200 Subject: * methods/https.cc: - cleanup broken downloads properly --- methods/https.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'methods/https.cc') diff --git a/methods/https.cc b/methods/https.cc index fc649d6c2..668a329e6 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -270,14 +270,17 @@ bool HttpsMethod::Fetch(FetchItem *Itm) long curl_servdate; curl_easy_getinfo(curl, CURLINFO_FILETIME, &curl_servdate); + File->Close(); + // cleanup if(success != 0) { _error->Error("%s", curl_errorstr); + // unlink, no need keep 401/404 page content in partial/ + unlink(File->Name().c_str()); Fail(); return true; } - File->Close(); // Timestamp struct utimbuf UBuf; -- cgit v1.2.3