diff options
author | Michael Vogt <mvo@debian.org> | 2014-02-20 16:32:48 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-02-20 16:32:48 +0100 |
commit | bef425ae689899d3add1f6a26b888012803a7308 (patch) | |
tree | 79ba0268c02129fbaaa1fb32c58904cb37ca1167 /methods/https.cc | |
parent | 74ac981563c6ccfd5291b6b6b83e193afa8aa40b (diff) | |
parent | 1c93747533dcf1cbbb2c743d0028ad157a7684a4 (diff) |
Merge branch 'debian/sid' into ubuntu/master
Conflicts:
configure.ac
debian/changelog
test/integration/test-kernel-helper-autoremove
Diffstat (limited to 'methods/https.cc')
-rw-r--r-- | methods/https.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/methods/https.cc b/methods/https.cc index 146b2bfb8..e713be19f 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -75,6 +75,8 @@ HttpsMethod::write_data(void *buffer, size_t size, size_t nmemb, void *userp) { HttpsMethod *me = (HttpsMethod *)userp; + if (me->Res.Size == 0) + me->URIStart(me->Res); if(me->File->Write(buffer, size*nmemb) != true) return false; @@ -88,7 +90,6 @@ 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 long)dltotal; - me->URIStart(me->Res); } return 0; } @@ -184,8 +185,12 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_WRITEDATA, this); curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback); curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, this); + // options curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false); curl_easy_setopt(curl, CURLOPT_FILETIME, true); + // only allow curl to handle https, not the other stuff it supports + curl_easy_setopt(curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS); + curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS); // SSL parameters are set by default to the common (non mirror-specific) value // if available (or a default one) and gets overload by mirror-specific ones. |