summaryrefslogtreecommitdiff
path: root/methods/https.h
Commit message (Collapse)AuthorAgeFilesLines
* detect 416 complete file in partial by expected hashDavid Kalnischkies2015-05-121-0/+1
| | | | | | | If we have the expected hashes we can check with them if the file we have in partial we got a 416 for is the expected file. We detected this with same-size before, but not every server sends a good Content-Range header with a 416 response.
* calculate hashes while downloading in httpsDavid Kalnischkies2015-04-191-2/+4
| | | | | | | | | | | | | We do this in HTTP already to give the CPU some exercise while the disk is heavily spinning (or flashing?) to store the data avoiding the need to reread the entire file again later on to calculate the hashes – which happens outside of the eyes of progress reporting, so you might ended up with a bunch of https workers 'stuck' at 100% while they were busy calculating hashes. This is a bummer for everyone using apt as a connection speedtest as the https method works slower now (not really, it just isn't reporting done too early anymore).
* calculate only expected hashes in methodsDavid Kalnischkies2015-04-191-1/+1
| | | | | | | | | | | | | | Methods get told which hashes are expected by the acquire system, which means we can use this list to restrict what we calculate in the methods as any extra we are calculating is wasted effort as we can't compare it with anything anyway. Adding support for a new hash algorithm is therefore 'free' now and if a algorithm is no longer provided in a repository for a file, we automatically stop calculating it. In practice this results in a speed-up in Debian as we don't have SHA512 here (so far), so we practically stop calculating it.
* improve https method queue progress reportingDavid Kalnischkies2015-04-191-1/+1
| | | | | | | | | | | | | The worker expects that the methods tell him when they start or finish downloading a file. Various information pieces are passed along in this report including the (expected) filesize. https was using a "global" struct for reporting which made it 'reuse' incorrect values in some cases like a non-existent InRelease fallbacking to Release{,.gpg} resulting in a size-mismatch warning. Reducing the scope and redesigning the setting of the values we can fix this and related issues. Closes: 777565, 781509 Thanks: Robert Edmonds and Anders Kaseorg for initial patchs
* derive more of https from http methodDavid Kalnischkies2015-03-161-6/+10
| | | | | | | | | Bug #778375 uncovered that https wasn't properly integrated in the class family tree of http as it was supposed to be leading to a NULL pointer dereference. Fixing this 'properly' was deemed to much diff for practically no gain that late in the release, so commit 0c2dc43d4fe1d026650b5e2920a021557f9534a6 just fixed the synptom, while this commit here is fixing the cause plus adding a test.
* merge debian/sid into debian/experimentalDavid Kalnischkies2015-03-161-5/+6
|\
| * Fix missing URIStart() for https downloadsMichael Vogt2015-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a explicit ReceivedData to HttpsMethod that indicates when we got data from the connection so that we can send URISTart() to the parent. This is needed because URIStart got moved in f9b4f12d from the progress_callback to write_data() and it only checks for Res.Size. In the old code if progress_callback is called by libcurl (and sets Res.Size) before write_data is called then URIStart() is never send. Making this a explicit ReceivedData variable fixes this issue.
* | Fix backward compatiblity of the new pkgAcquireMethod::DropPrivsOrDie()Michael Vogt2014-10-131-0/+2
| | | | | | | | | | | | | | | | Do not drop privileges in the methods when using a older version of libapt that does not support the chown magic in partial/ yet. To do this DropPrivileges() now will ignore a empty Apt::Sandbox::User. Cleanup all hardcoded _apt along the way.
* | make http size check workMichael Vogt2014-10-061-2/+1
|\ \
| * | fix: Member variable 'X' is not initialized in the constructor.David Kalnischkies2014-09-271-3/+2
| |/ | | | | | | | | Reported-By: cppcheck Git-Dch: Ignore
* / make https honor ExpectedSize as wellMichael Vogt2014-08-261-1/+2
|/
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-1/+6
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-131-8/+8
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-1/+1
|
* correct some style/performance/warnings from cppcheckDavid Kalnischkies2014-01-161-1/+1
| | | | | | | | The most "visible" change is from utime to utimensat/futimens as the first one isn't part of POSIX anymore. Reported-By: cppcheck Git-Dch: Ignore
* handle complete responses to https range requestsDavid Kalnischkies2013-10-011-0/+29
| | | | | | | | | | | | | Servers might respond with a complete file either because they don't support Ranges at all or the If-Range condition isn't statisfied, so we have to parse the headers curl gets ourself to seek or truncate the file we have so far. This also finially adds the testcase testing a bunch of partial situations for both, http and https - which is now all green. Closes: 617643, 667699 LP: 1157943
* add missing curl_easy_cleanup()Michael Vogt2013-01-091-0/+5
|
* just in case: correct the header-guard for https to not match httpDavid Kalnischkies2012-02-111-2/+2
|
* remove the arbitrary MAXLEN limit for response lines (Closes: #658346)David Kalnischkies2012-02-111-2/+0
|
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-1/+2
|
* methods/https.cc: cleanup for CURLOPT_LOW_SPEED_TIMEMichael Vogt2009-11-171-0/+2
|
* Minor typos.Otavio Salvador2007-07-101-1/+1
|
* * Fix compilation warnings:Otavio Salvador2007-07-101-1/+1
| | | | | | | | | | - apt-pkg/contrib/configuration.cc: wrong argument type; - apt-pkg/deb/dpkgpm.cc: wrong signess; - apt-pkg-acquire-item.cc: wrong signess and orderned initializers; - methods/https.cc: - type conversion; - unused variable; - changed SetupProxy() method to void;
* * added https transport method as optional pacakgeMichael Vogt2006-12-191-0/+48