--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: apt: HTTP 406 Not Acceptable with alternates breaks update
- From: "Dominik Schulz \(tex\)" <lkml@ds.gauner.org>
- Date: Mon, 03 Jun 2013 17:53:11 +0200
- Message-id: <20130603155311.15655.28844.reportbug@msmagic>
Package: apt
Version: 0.8.16~exp12ubuntu10.10
Severity: normal
Tags: patch
apt-get update breaks when the server replies with a "HTTP/1.1 406 Not
Acceptable" to a Range/If-Range request.
The proper solution would be to handle the Alternates header in the
response but as this would introduce a lot of additional complexity
the attached patch offers a option to disable Range requests instead.
Please consider applying the patch.
-- Package-specific info:
-- (no /etc/apt/preferences present) --
-- (/etc/apt/sources.list present, but not submitted) --
-- System Information:
Debian Release: wheezy/sid
APT prefers precise-updates
APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-29-generic (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages apt depends on:
ii dpkg 1.16.1.2ubuntu7.1
ii gnupg 1.4.11-3ubuntu2.2
ii libapt-pkg4.12 0.8.16~exp12ubuntu10.10
ii libc6 2.15-0ubuntu10.4
ii libgcc1 1:4.6.3-1ubuntu5
ii libstdc++6 4.6.3-1ubuntu5
ii ubuntu-keyring 2011.11.21.1
apt recommends no packages.
Versions of packages apt suggests:
ii apt-doc <none>
ii aptitude 0.6.6-1ubuntu1.2
ii bzip2 1.0.6-1
ii dpkg-dev 1.16.1.2ubuntu7.1
ii python-apt 0.8.3ubuntu7.1
ii xz-lzma [lzma] 5.1.1alpha+20110809-3
-- no debconf information
>From e44f7f4b889f8e0113ab1441fbb9c5bbf8a389bc Mon Sep 17 00:00:00 2001
From: Dominik Schulz <dominik.schulz@gauner.org>
Date: Mon, 3 Jun 2013 16:49:15 +0200
Subject: [PATCH] Add Acquire::http::SendRange option
This commit adds the option Acquire::http::SendRange which allows for
disabling sending of Range/If-Range headers. Support for these headers
is not fully implemented and may break the update process. By providing
this option the operator gains control over this behavior while
not changing any defaults for the majority of our users.
---
methods/http.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/methods/http.cc b/methods/http.cc
index db1085a..baaf7e9 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -740,7 +740,10 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
// Check for a partial file
struct stat SBuf;
- if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0)
+ if (
+ _config->FindB("Acquire::http::SendRange", true) == true
+ && stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0
+ )
{
// In this case we send an if-range query with a range header
sprintf(Buf,"Range: bytes=%lli-\r\nIf-Range: %s\r\n",(long long)SBuf.st_size - 1,
--
1.7.9.5
--- End Message ---
--- Begin Message ---
Source: apt
Source-Version: 0.8.10.3+squeeze7
We believe that the bug you reported is fixed in the latest version of
apt, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 710924@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Michael Vogt <mvo@debian.org> (supplier of updated apt package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Fri, 17 Oct 2014 09:37:24 +0200
Source: apt
Binary: apt apt-doc libapt-pkg-dev libapt-pkg-doc apt-utils apt-transport-https
Architecture: source all amd64
Version: 0.8.10.3+squeeze7
Distribution: squeeze-lts
Urgency: medium
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Michael Vogt <mvo@debian.org>
Description:
apt - Advanced front-end for dpkg
apt-doc - Documentation for APT
apt-transport-https - APT https transport
apt-utils - APT utility programs
libapt-pkg-dev - Development files for APT's libapt-pkg and libapt-inst
libapt-pkg-doc - Documentation for APT development
Closes: 710924
Changes:
apt (0.8.10.3+squeeze7) squeeze-lts; urgency=medium
.
[ David Kalnischkies ]
* methods/http.cc:
- retry without partial data after a 416 response (closes: 710924)
Checksums-Sha1:
8956bae37af3af4596f96c7fc84b224e56387205 1974 apt_0.8.10.3+squeeze7.dsc
3812f090ae19b2e98db5415cb7a726e0bf66a2c9 3154928 apt_0.8.10.3+squeeze7.tar.gz
49cee9d7d596c59a310d73ee949ce2cb859566fa 235604 apt-doc_0.8.10.3+squeeze7_all.deb
bd2d30cdd7a03372112ac117b6bcc3b342d93f34 699056 libapt-pkg-doc_0.8.10.3+squeeze7_all.deb
14b5310d6dd6f3bf68dca394e4ef8760268995f2 2185744 apt_0.8.10.3+squeeze7_amd64.deb
fa9d8aca801732a3b408d73e1df6267b5ce4e054 151672 libapt-pkg-dev_0.8.10.3+squeeze7_amd64.deb
a09d9671390401e9b81e0ce581968782e604b5f3 275916 apt-utils_0.8.10.3+squeeze7_amd64.deb
f70ebacade3b3bbb8a3ba2156556fc4cd155b90b 84224 apt-transport-https_0.8.10.3+squeeze7_amd64.deb
Checksums-Sha256:
3f2b6b69dc4fee062fa87ead203b3a47ec8b864a13690b5719a39e00926ee005 1974 apt_0.8.10.3+squeeze7.dsc
28c9baafc22cf5162bada9c19847c8a9e29fc942c111d02eea58c90971d6896e 3154928 apt_0.8.10.3+squeeze7.tar.gz
b02e4cd54d63ddba097ea7294fe3eb857f5cbdd2e42023f42128a2fda19e03d7 235604 apt-doc_0.8.10.3+squeeze7_all.deb
18470e4eedc6b616777bb76f2335979a677a9012a6a007534e5f1b3784be4788 699056 libapt-pkg-doc_0.8.10.3+squeeze7_all.deb
193251c6de95723e6a9d32d5df8f936b0c53fae74460e6c7fa67e54069ce984b 2185744 apt_0.8.10.3+squeeze7_amd64.deb
fb5a0e8233a0c2faa0404c1e3446424f0eb0a2c14cee3b3c13265566cd94ab80 151672 libapt-pkg-dev_0.8.10.3+squeeze7_amd64.deb
7ce34fdca8b4fc03b2b164c79d0967e3291034d2fbc1f895f75f3eea5f70edea 275916 apt-utils_0.8.10.3+squeeze7_amd64.deb
c36b0aa225038adfa5829c2e535d55072ec93fa6e474c6358ed0873c819993c4 84224 apt-transport-https_0.8.10.3+squeeze7_amd64.deb
Files:
7003e89a61867b3bec4a2416f1db5b6c 1974 admin important apt_0.8.10.3+squeeze7.dsc
fb711d86d8ab750a724457b8f682b219 3154928 admin important apt_0.8.10.3+squeeze7.tar.gz
212c6f6068fc98f1aca0af2167e75830 235604 doc optional apt-doc_0.8.10.3+squeeze7_all.deb
360865bc9ae9fbb67515fe626787ddcd 699056 doc optional libapt-pkg-doc_0.8.10.3+squeeze7_all.deb
230e5eb4e822f7cf5a0710b957df7765 2185744 admin important apt_0.8.10.3+squeeze7_amd64.deb
3d2b4fac9f70b5c1d188799990f8225c 151672 libdevel optional libapt-pkg-dev_0.8.10.3+squeeze7_amd64.deb
61b1ff5ee23aa85c8591d1a79a490ab7 275916 admin important apt-utils_0.8.10.3+squeeze7_amd64.deb
a9e1a3a916be54a10692e48de521791b 84224 admin optional apt-transport-https_0.8.10.3+squeeze7_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJUTkCHAAoJEJjKuzq9TKWeBZUQAMIym/NjC6kz0/QL2KvBTudS
tpcLyKa0Sxblbd43W41IosCAHvdXCGebyKwqfqMsqs8uBwkmbV/4cKmUm7OvIujf
dyVWFDjz9Px0aGa9iRlxONpXUa7iRzfnHg/c/pnWPrViwdxQBXcyGhFi/JC9jrIz
8cfBw7XD9xpTaaOMLlrbP6sH2uBDlUvn2mKgMS2QG3OqJVFwLRrW8aAbx7Gf/1x2
2L87faTgidiMzWYhfqECYabjIZWE+LMInrTH8kSV0WHNlMmhmenfW7tcgzWmQyJw
brHTvKHmTMW1fGI1vN9tAWcstfmQSizhvtvCVugfXcWDMWiAc0PNA+TNejYtIBYS
wJDsBl2xGDjPBrUC1aIaM76dEPWIQARj2ab4ewtz2r4qgBHl7UvxW6vq2tmSZzEB
CKNb2rUUjTQA291kRVkbOJilXXYwojo7uO+NKJdQdV1jV/rxkncKPD+rEzVJVo9E
ORP89SWHzK51TpEwsF7pDarPRGkxVgZzzxrw6LSvohuHPtB3TqiwfJBvmQ5Xga2Z
u7A88ywNO0X7YjepD09jcY2eIegGIehpgBiFfCnJm3MckcJdDPPcHSQl6fQJnD04
AYQxzZ5JY0phGBKPjNdxGDEiAhbf/FCKEqsOGiTdcPdZln3UldSdsQ0R8VnCefEN
QPLzqNyIgIaNm9gLcFo7
=LS8x
-----END PGP SIGNATURE-----
--- End Message ---