apt /usr/lib/apt/methods/http has proxy issues

Bug #230832 reported by Ashwin
10
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: apt

Description: Ubuntu 8.04
Release: 8.04
Source package is: apt-0.7.9ubuntu17

I am behind a proxy and apt /usr/lib/apt/methods/http does not use the correct http headers when fetching the .tar.gz file. This seems to be a combination of problems and I am not sure if the proxy is buggy or the originating website is buggy. So instead of getting a gzip file, I get a gunzipped tar file from the proxy when I try to get any source packages.
This subsequently fails checksum.

Can you please apply this patch, it is just one line:

diff -r apt-0.7.9ubuntu17/methods/http.cc ../apt-0.7.9ubuntu17/methods/http.cc
687a688,691
> // generate proper encoding
> if (Itm->Uri.substr(Itm->Uri.length() - 3) == ".gz") {
> strcat(Buf, "Accept-Encoding: gzip,deflate\r\n");
> }

It simply adds the correct Accept-Encoding header flag while requesting a .gz file. This fixes my problem and I can do a "apt-get source" from behind a proxy as well.

Eric Kuzmenko (gralco)
Changed in apt:
assignee: nobody → gralco
assignee: gralco → nobody
status: New → Confirmed
assignee: nobody → gralco
assignee: gralco → nobody
assignee: nobody → gralco
Eric Kuzmenko (gralco)
Changed in apt:
assignee: gralco → nobody
Eric Kuzmenko (gralco)
Changed in apt:
assignee: nobody → ubuntu-kernel-team
Changed in apt:
assignee: ubuntu-kernel-team → nobody
Revision history for this message
Fabián Rodríguez (magicfab) wrote :

I am having the same problem using apt-cacher-ng, when trying to upgrade to Ubuntu 8.10 I get the following:

magicfab@andrea:~$ sudo do-release-upgrade
Checking for a new ubuntu release
Failed Upgrade tool signature
Done Upgrade tool
Done downloading
extracting 'intrepid.tar.gz'
authenticate 'intrepid.tar.gz' against 'intrepid.tar.gz.gpg'
exception from gpg: GnuPG exited non-zero, with code 131072
Debug information:

gpg: WARNING: unsafe permissions on homedir `/tmp/tmp-AFwaU'

gpg: can't open `/tmp/tmp-AFwaU/intrepid.tar.gz.gpg'
gpg: verify signatures failed: file open error

Authentication failed
Authenticating the upgrade failed. There may be a problem with the network or with the server.
magicfab@andrea:~$

Revision history for this message
Eduard Bloch (edi-gmx) wrote :

There seem to be some trouble with Ubuntu mirror configuration .tar.gz.gpg files, see https://bugs.launchpad.net/ubuntu/+bug/245219 for details. Question from apt-cacher-ng side: are you using another http proxy, configured in apt-cacher-ng's configuration? And could you help with debugging?

Increase the debug level in acng.conf (set Debug:3 or so) and then post the recent lines of /var/log/apt-cacher-ng/apt-cacher.log and /var/log/apt-cacher-ng/apt-cacher.err when the mentioned problem occurs.

Revision history for this message
Brian Murray (brian-murray) wrote :

Is anybody experiencing this with a supported release of Ubuntu?

Changed in apt (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for apt (Ubuntu) because there has been no activity for 60 days.]

Changed in apt (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.