summaryrefslogtreecommitdiff
path: root/methods/http.h
Commit message (Collapse)AuthorAgeFilesLines
* use std::locale::global instead of setlocaleDavid Kalnischkies2016-05-281-1/+0
| | | | | | We use a wild mixture of C and C++ ways of generating output, so having a consistent world-view in both styles sounds like a good idea and should help in preventing regressions.
* apply various suggestions made by cppcheckDavid Kalnischkies2015-11-051-1/+1
| | | | | Reported-By: cppcheck Git-Dch: Ignore
* allow acquire method specific options via Binary scopeDavid Kalnischkies2015-11-051-1/+1
| | | | | | | | Allows users who know what they are getting themselves into with this trick to e.g. disable privilege dropping for e.g. file:// until they can fix up the permissions on those repositories. It helps also the test framework and people with a similar setup (= me) to run in less modified environments.
* fix two memory leaks reported by gccDavid Kalnischkies2015-09-141-1/+1
| | | | | Reported-By: gcc -fsanitize=address -fno-sanitize=vptr Git-Dch: Ignore
* add c++11 override marker to overridden methodsDavid Kalnischkies2015-08-101-17/+17
| | | | | | | | | C++11 adds the 'override' specifier to mark that a method is overriding a base class method and error out if not. We hide it in the APT_OVERRIDE macro to ensure that we keep compiling in pre-c++11 standards. Reported-By: clang-modernize -add-override -override-macros Git-Dch: Ignore
* calculate hashes while downloading in httpsDavid Kalnischkies2015-04-191-1/+1
| | | | | | | | | | | | | 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.
* make http size check workMichael Vogt2014-10-061-3/+0
|\
| * Make Proxy-Auto-Detect check for each hostMichael Vogt2014-09-021-3/+0
| | | | | | | | | | | | | | | | | | When doing Acquire::http{,s}::Proxy-Auto-Detect, run the auto-detect command for each host instead of only once. This should make using "proxy" from libproxy-tools feasible which can then be used for PAC style or other proxy configurations. Closes: #759264
* | Pass ExpectedSize to tthe backend methodMichael Vogt2014-08-261-1/+3
|/ | | | | This ensures that we can stop downloading if the server send too much data by accident (or by a malicious attempt)
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-0/+4
| | | | | | | | 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)
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-1/+1
|
* handle complete responses to https range requestsDavid Kalnischkies2013-10-011-0/+1
| | | | | | | | | | | | | 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
* refactor http client implementationDavid Kalnischkies2013-10-011-97/+39
| | | | | | | | | | | | | No effective behavior change, just shuffling big junks of code between methods and classes to split them into those strongly related to our client implementation and those implementing HTTP. The idea is to get HTTPS to a point in which most of the implementation can be shared even though the client implementations itself is completely different. This isn't anywhere near yet though, but it should beenough to reuse at least a few lines from http in https now. Git-Dch: Ignore
* Fix English spelling error in a message ('A error'). Unfuzzybubulle@debian.org2013-04-101-1/+1
| | | translations. Closes: #705087
* fix a bunch of cppcheck "(warning) Member variable '<#>' is notDavid Kalnischkies2012-03-041-3/+4
| | | | initialized in the constructor." messages (no functional change)
* remove the arbitrary MAXLEN limit for response lines (Closes: #658346)David Kalnischkies2012-02-111-3/+1
|
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-2/+5
|
* do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies2011-09-191-9/+9
|
* merge with debian/experimentalDavid Kalnischkies2011-09-131-7/+7
|\
| * follow the recommendation of cppcheck to make some method methods (scnr)David Kalnischkies2011-08-111-7/+7
| | | | | | | | const and initial mostly Debug member values in the constructors
* | Support large files in the complete toolset. Indexes of thisDavid Kalnischkies2011-09-131-15/+15
|/ | | | size are pretty unlikely for now, but we need it for deb packages which could become bigger than 4GB now (LP: #815895)
* ServerState is a struct and not a class (clang mismatch type warning)David Kalnischkies2011-05-171-1/+1
|
* fix compiler warning in the new mirror codeDavid Kalnischkies2010-06-091-1/+1
|
* * merge the remaining Ubuntu change:Michael Vogt2010-06-091-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - on gpg verification failure warn and restore the last known good state - on failure display the IP of the server (useful for servers that use round robin DNS) - support Original-Maintainer in RewritePackageOrder - enable cdrom autodetection via libudev by default - show messsage about Vcs in use when apt-get source is run for packages maintained in a Vcs - better support transitional packages with mark auto-installed. when the transitional package is in "oldlibs" the new package is not marked auto installed (same is true for section metapackages) - provide new "deb mirror://archive.foo/mirrors.list sid main" method expects a list of mirrors (generated on the server e.g. via geoip) and will use that, including cycle on failure - write apport crash file on package failure (disabled by default on debian until apport is available) - support mirror failure reporting (disabled by default on debian)
| * merged from the mvo branchMichael Vogt2010-02-171-0/+2
| |\
| * | * [ABI break] merge support for http redirects, thanks toMichael Vogt2009-02-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jeff Licquia and Anthony Towns * [ABI break] use int for the package IDs (thanks to Steve Cotton) - Galician updated. Closes: #509151 - Catalan updated. Closes: #509375 - Vietnamese updated. Closes: #509422 - Traditional Chinese added. Closes: #510664 * COPYING: - Actualized. Removed obsolete Qt section, added GPLv2 clause. (Closes: #440049, #509337) * Clarify the --help for 'purge' (LP: #243948)
| * | * cmdline/apt-get.cc:Michael Vogt2007-07-121-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - fix in the task-install code regexp (thanks to Adam Conrad and Colin Watson). This should bring the livecd build back into shape * Fix compilation warnings: - 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;
| * \ \ * apt-pkg/deb/dpkgpm.cc:Michael Vogt2007-06-141-1/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - apport integration added, this means that a apport report is written on dpkg failures * merged from debian/unstable, remaining changes: - maintainer field changed * merged the debian/experimental changes back into the debian/sid branch * merged from Christian Perrier: * mr.po: New Marathi translation Closes: #416806 * zh_CN.po: Updated by Eric Pareja Closes: #416822 * tl.po: Updated by Eric Pareja Closes: #416638 * gl.po: Updated by Jacobo Tarrio * da.po: Updated by Claus Hindsgaul * fr.po: Remove a non-breakable space for usability * ru.po: Updated Russian translation. Closes: #405476 * *.po: Unfuzzy after upstream typo corrections * buildlib/archtable: - added support for sh3/sh4 (closes: #424870) - added support for m32r (closes: #394096) * buildlib/systemtable: - added support for lpia * configure.in: - check systemtable for architecture mapping too * fix error in AutocleanInterval, closes: #319339 (thanks to Israel G. Lugo for the patch) * add "purge" commandline argument, closes: #133421) (thanks to Julien Danjou for the patch) * add "purge" commandline argument, closes: #133421) (thanks to Julien Danjou for the patch) * fix FTBFS with gcc 4.3, closes: #417090 (thanks to Martin Michlmayr for the patch) * add --dsc-only option, thanks to K. Richard Pixley * Removed the more leftover #pragma interface/implementation closes: #306937 (thanks to Andreas Henriksson for the patch) * ABI library name change because its build against new glibc * implement SourceVer() in pkgRecords (thanks to Daniel Burrows for the patch!) * apt-pkg/algorithm.cc: - use clog for all debugging - only increase the score of installed applications if they are not obsolete - fix resolver bug on removal triggered by weak-dependencies with or-groups * methods/http.cc: - send apt version in User-Agent * apt-pkg/deb/debrecords.cc: - fix SHA1Hash() return value * apt-pkg/cdrom.cc: - only unmount if APT::CDROM::NoMount is false * methods/cdrom.cc: - only umount if it was mounted by the method before - if decompression of a index fails, delete the index * vi.po: Updated to 515t. Closes: #426976 * eu.po: Updated to 515t. Closes: #423766 * pt.po: 515t. Closes: #423111 * fr.po: Updated by Christian Perrier * Update all PO and the POT. Gives 513t2f for formerly complete translations * Package that contains tall the new features * Removed all #pragma interface/implementation * Branch that contains tall the new features: * translated package descriptions * task install support * automatic dependency removal (thanks to Daniel Burrows) * merged support for the new dpkg "Breaks" field (thanks to Ian Jackson) * handle network failures more gracefully on "update" * support for unattended-upgrades (via unattended-upgrades package) * added apt-transport-https method - ca.po: Updated to 514t - be.po: Updated to 514t - it.po: Updated to 514t - hu.po: Updated to 514t - zh_TW.po: Updated to 514t - ar.po: Updated to 293t221u. - ru.po: Updated to 514t. Closes: #392466 - nb.po: Updated to 514t. Closes: #392466 - pt.po: Updated to 514t. Closes: #393199 - fr.po: One spelling error corrected: s/accèder/accéder - km.po: Updated to 514t. - ko.po: Updated to 514t. - bg.po: Updated to 514t. - de.po: Updated to 514t. - en_GB.po: Updated to 514t. * debian/control: - depend on debian-archive-keyring to offer clean upgrade path (closes: #386800) * merged "install-recommends" branch (ABI break): - new "--install-recommends" - install new recommends on "upgrade" if --install-recommends is given - new "--fix-policy" option to install all packages with unmet important dependencies (usefull with --install-recommends to see what not-installed recommends are on the system) - fix of recommended packages display (only show CandidateVersion fix or-group handling) * merged "install-task" branch (use with "apt-get install taskname^") * Applied patch from Daniel Schepler to make apt bin-NMU able. * apt-pkg/acquire-item.cc: - fix reversed logic of the "Acquire::PDiffs" option * apt-pkg/contrib/sha256.cc: - applied patch to fix unaligned access problem. Closes: #367417 (thanks to David Mosberger) * apt-pkg/contrib/sha256.{cc,h},hashes.{cc,h}: support for sha256 (thanks to Anthony Towns) * ftparchive/cachedb.{cc,h},writer.{cc,h}: optimizations (thanks to Anthony Towns) * apt pdiff support from experimental merged * apt-pkg/deb/dpkgpm.cc: wording fixes (thanks to Matt Zimmerman) - fix error in dpkg interaction (closes: #364513, thanks to Martin Dickopp)
| * | | | * prototype of mirror method addedMichael Vogt2006-11-291-3/+4
| | | | |
* | | | | * methods/http.cc: Michael Vogt2010-05-071-3/+34
| |_|_|/ |/| | | | | | | - code cleanup, add (some) doxygen strings
* | | | add Acquire::http::ProxyAutoDetect configuration that Michael Vogt2010-02-051-0/+2
| | | | | | | | | | | | | | | | can be used to call a external helper to figure out the proxy configuration and return it to apt via stdout
* | | | [ABI break] merge support for http redirects, thanks toMichael Vogt2009-01-301-0/+3
| |_|/ |/| | | | | Jeff Licquia and Anthony Towns
* | | Minor typos.Otavio Salvador2007-07-101-1/+1
| |/ |/|
* | * debian/control: increase standards versionMichael Vogt2007-06-091-2/+0
|/ | | | | * methods/http.cc: revert pipeline depth and move global Proxy to here * methods/http.h: remove Proxy from here
* * merged http download limit for apt (#146877)Michael Vogt2005-11-221-0/+5
|
* Corrections for object lifetimeArch Librarian2004-09-201-3/+3
| | | | | | Author: jgg Date: 2002-04-18 05:09:38 GMT Corrections for object lifetime
* G++3 fixes from RandolphArch Librarian2004-09-201-2/+7
| | | | | | Author: jgg Date: 2001-05-27 23:53:55 GMT G++3 fixes from Randolph
* More SHA-1 prepArch Librarian2004-09-201-3/+3
| | | | | | Author: jgg Date: 2001-03-06 07:15:29 GMT More SHA-1 prep
* Join with aliencodeArch Librarian2004-09-201-2/+3
| | | | | | Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
* Take careful care of persistence modesArch Librarian2004-09-201-1/+4
| | | | | | Author: jgg Date: 2000-05-28 04:33:59 GMT Take careful care of persistence modes
* Reorderd error handlingArch Librarian2004-09-201-2/+4
| | | | | | Author: jgg Date: 1999-12-09 03:45:56 GMT Reorderd error handling
* http pipelining controlArch Librarian2004-09-201-2/+3
| | | | | | Author: jgg Date: 1998-12-10 05:39:53 GMT http pipelining control
* HTTP pipeliningArch Librarian2004-09-201-5/+5
| | | | | | Author: jgg Date: 1998-12-05 04:19:01 GMT HTTP pipelining
* Almost done nowArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1998-11-11 06:54:13 GMT Almost done now
* Http methodArch Librarian2004-09-201-1/+7
| | | | | | Author: jgg Date: 1998-11-04 07:10:49 GMT Http method
* HTTP bugsArch Librarian2004-09-201-5/+4
| | | | | | Author: jgg Date: 1998-11-01 08:07:11 GMT HTTP bugs
* New http methodArch Librarian2004-09-201-0/+141
Author: jgg Date: 1998-11-01 05:27:29 GMT New http method