summaryrefslogtreecommitdiff
path: root/methods
Commit message (Collapse)AuthorAgeFilesLines
* add Acquire::http::Proxy-Auto-Detect to the apt.conf.5 manpage (closes: 726597)Michael Vogt2013-10-221-1/+5
|
* handle complete responses to https range requestsDavid Kalnischkies2013-10-016-25/+92
| | | | | | | | | | | | | 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
* fix partial (206 and 416) support in httpsDavid Kalnischkies2013-10-011-33/+67
| | | | | | | As lengthy discussed in lp:1157943 partial https support was utterly broken as a 206 response was handled as an (unhandled) error. This is the first part of fixing it by supporting a 206 response and starting to deal with 416.
* refactor http client implementationDavid Kalnischkies2013-10-015-889/+1049
| | | | | | | | | | | | | 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
* replace "filesize - 1" trick in http with proper 416 handlingDavid Kalnischkies2013-10-011-6/+21
| | | | | | | | Our http client requests the "filesize - 1" for the small edgecase of handling a file which was completely downloaded, but not yet moved to the correct place as we get 416 errors in that case, but as we can handle 416 returns now we just special-case the situation of requesting the exact filesize and handle it as a 200 without content instead.
* retry without partial data after a 416 responseDavid Kalnischkies2013-10-011-2/+17
| | | | | | | | | | | | | | | If we get a 416 from the server it means the Range we asked for is above the real filesize of the file on the server. Mostly this happens if the server isn't supporting If-Range, but regardless of how we end up with the partial data, the data is invalid so we discard it and retry with a fresh plate and hope for the best. Old behavior was to consider 416 an error and retry with a different compression until we ran out of compression and requested the uncompressed file (which doesn't exist on most mirrors) with an accept line which server answered with "406 Not Acceptable". Closes: 710924
* Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sidMichael Vogt2013-07-284-1/+5
|\
| * fix missing va_end()Michael Vogt2013-07-262-0/+3
| |
| * add missing "free(buffer) for allocated bufferMichael Vogt2013-07-251-0/+1
| |
| * fix off-by-one error in HttpMethod::​AutoDetectProxy()Michael Vogt2013-07-251-1/+1
| |
* | request absolute URIs from proxies again (0.9.9.3 regession)David Kalnischkies2013-07-261-4/+16
| | | | | | | | | | | | | | | | Commit 2b9c9b7f28b18f6ae3e422020e8934872b06c9f3 not only removes keep-alive, but also changes the request URI send to proxies which are required to be absolute URIs rather than the usual absolute paths. Closes: 717891
* | Do not send a connection: keep-alive, at allRaphael Geissert2013-07-141-21/+8
|/
* trigger NODATA error for invalid InRelease filesDavid Kalnischkies2013-06-201-9/+7
| | | | | | | | | | | | | | | | | With the selfgrown splitting we got the problem of not recovering from networks which just reply with invalid data like those sending us login pages to authenticate with the network (e.g. hotels) back. The good thing about the InRelease file is that we know that it must be clearsigned (a Release file might or might not have a detached sig) so if we get a file but are unable to split it something is seriously wrong, so there is not much point in trying further. The Acquire system already looks out for a NODATA error from gpgv, so this adds a new error message sent to the acquire system in case the splitting we do now ourselves failed including this magic word. Closes: #712486
* remove -ldl from cdrom and -lutil from apt-get linkageDavid Kalnischkies2013-06-091-1/+1
| | | | | | | | | | Building src:apt shows: dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/apt/usr/lib/apt/methods/cdrom was not linked against libdl.so.2 (it uses none of the library's symbols) dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/apt/usr/bin/apt-get was not linked against libutil.so.1 (it uses none of the library's symbols)
* Fix double free (closes: #711045)Michael Vogt2013-06-061-0/+3
| | | | | | | * Fix double free (closes: #711045) * Fix crash when the "mirror" method does not find any entry (closes: #699303)
* merged patch from Daniel Hartwig to fix URI and proxy releated issuesMichael Vogt2013-05-082-8/+26
|
* merged from the debian-wheezy branchMichael Vogt2013-05-081-1/+6
|\
| * properly handle if-modfied-since with libcurl/https Michael Vogt2013-05-081-1/+6
| | | | | | | | (closes: #705648)
* | Fix English spelling error in a message ('A error'). Unfuzzybubulle@debian.org2013-04-101-1/+1
| | | | | | translations. Closes: #705087
* | merged bundle from davidMichael Vogt2013-04-081-2/+0
|\ \
| * | various simple changes to fix cppcheck warningsDavid Kalnischkies2013-03-101-2/+0
| | |
* | | merged lp:~mvo/apt/fix-inrelease5Michael Vogt2013-04-021-13/+2
|\ \ \
| * | | * apt-pkg/contrib/gpgv.cc:David Kalnischkies2013-03-151-13/+1
| | | | | | | | | | | | | | | | - ExecGPGV is a method which should never return, so mark it as such and fix the inconsistency of returning in error cases
| * | | * apt-pkg/indexcopy.cc:David Kalnischkies2013-03-151-1/+2
| | |/ | |/| | | | - rename RunGPGV to ExecGPGV and move it to apt-pkg/contrib/gpgv.cc
* | | * methods/connect.cc:Michael Vogt2013-03-251-2/+2
| | | | | | | | | - use Errno() instead of strerror(), thanks to David Kalnischk
* | | add new config options "Acquire::ForceIPv4" and Michael Vogt2013-03-221-0/+8
| | | | | | | | | | | | "Acquire::ForceIPv6" to allow focing one or the other (closes: #611891)
* | | merge patch from Colin to fix error message from getaddrinfo() (#703603)Michael Vogt2013-03-211-0/+3
| |/ |/|
* | quote plus in filenames to work around a bug in the S3 serverMichael Vogt2013-01-241-1/+5
| | | | | | (LP: #1003633)
* | * methods/http.cc:Michael Vogt2013-01-111-1/+1
| | | | | | | | | | | | - quote spaces in filenames to ensure as the http method is also (potentially) used for non deb,dsc content that may contain spaces, thanks to Daniel Hartwig and Thomas Bushnell (LP: #1086997)
* | add missing curl_easy_cleanup()Michael Vogt2013-01-091-0/+5
| |
* | * methods/https.cc:Michael Vogt2013-01-091-2/+2
|/ | | | - reuse connection in https, thanks to Thomas Bushnell, BSG for the patch. LP: #1087543, Closes: #695359
* add spaces around PACKAGE_VERSION to fix FTBFS with -std=c++11David Kalnischkies2012-05-172-2/+2
|
* * methods/http.cc:David Kalnischkies2012-05-151-1/+1
| | | | | - after many years of pointless discussions disable http/1.1 pipelining by default as many webservers and proxies seem to be unable to conform to specification must's (rfc2616 section 8.1.2.2) (LP: #996151)
* * methods/mirror.cc:Raphael Geissert2012-05-141-1/+1
| | | | - generate an equal sign also for the first arch (Closes: #669142)
* * apt-pkg/acquire*.cc:Raphael Geissert2012-05-141-1/+4
| | | | | | | - handle redirections in the worker with the right method instead of in the method the redirection occured in (Closes: #668111) * methods/http.cc: - forbid redirects to change protocol
* we don't need zlib (anymore) in rred so don't include itDavid Kalnischkies2012-05-101-1/+0
|
* newer gcc versions seems to have no problem with that, but while workingDavid Kalnischkies2012-04-171-1/+1
| | | | with g++-4.1 it complains about this so lets be extra clear
* * methods/bzip2.cc:David Kalnischkies2012-04-053-198/+31
| | | | - remove it as the functionality for all compressors can be provided by gzip.cc now with the usage of FileFD
* make these retry_write methods static so that they don't end up as symbolsDavid Kalnischkies2012-03-221-1/+1
|
* * debian/apt-utils.install:David Kalnischkies2012-03-221-1/+1
| | | | - ship the ftparchive, apt-extractemplates and apt-sortpkgs locales in the apt-utils package instead of the apt package
* the previously used VERSION didn't work everywhere so we are switchingDavid Kalnischkies2012-03-222-2/+2
| | | | to the more standard PACKAGE_VERSION and make it work in every file
* * methods/rred.cc:David Kalnischkies2012-03-202-7/+23
| | | | | | | | | | | - check return of writev() as gcc recommends * methods/mirror.cc: - check return of chdir() as gcc recommends * apt-pkg/deb/dpkgpm.cc: - check return of write() a gcc recommends * apt-inst/deb/debfile.cc: - check return of chdir() as gcc recommends * apt-inst/deb/dpkgdb.cc: - check return of chdir() as gcc recommends
* * methods/makefile:David Kalnischkies2012-03-201-1/+1
| | | | - do not link rred against libz anymore as FileFd handles all this transparently now
* micro-optimize "(performance) Prefer prefix ++/-- operators for ↵David Kalnischkies2012-03-051-1/+1
| | | | non-primitive types."
* fix "(performance) Possible inefficient checking for 'R' emptiness."David Kalnischkies2012-03-051-1/+1
|
* fix "(style) Checking if unsigned variable 'Minor' is less than zero."David Kalnischkies2012-03-051-1/+1
|
* ensure that (s)scanf doesn't parse a too long Code now that a previousDavid Kalnischkies2012-03-051-5/+7
| | | | commit lifted the Line-length limit
* fix two "(style) Variable 'Res' is assigned a value that is never used"David Kalnischkies2012-03-041-4/+2
|
* fix "(error) Possible null pointer dereference: BindAddr" by ensuringDavid Kalnischkies2012-03-041-2/+2
| | | | that BindAddr isn't NULL after getaddrinfo()
* fix a bunch of cppcheck "(warning) Member variable '<#>' is notDavid Kalnischkies2012-03-043-4/+8
| | | | initialized in the constructor." messages (no functional change)