Package: apt-cacher
Version: 1.6.12ubuntu1
Severity: important

"apt-get update" returns "Bad header line". This problem also happens when 
using "aptitude update" and "aptitude install" although "apt-get install" works 
fine.

Instrumenting the source code of apt-get: methods/http.cc as follows:
--- http.cc.orig        2011-03-20 11:28:12.347525680 +0100
+++ http.cc     2011-03-20 09:17:23.409707029 +0100
@@ -535,8 +535,11 @@ bool ServerState::HeaderLine(string Line
    {
       // Blah, some servers use "connection:closes", evil.
       Pos = Line.find(':');
-      if (Pos == string::npos || Pos + 2 > Line.length())
-        return _error->Error(_("Bad header line"));
+      if (Pos == string::npos || Pos + 2 > Line.length()) {
+       if (Debug == true)
+         clog << "[Bad header line] The offending HTTP header line is  " << 
Line << std::endl;
+       return _error->Error(_("Bad header line"));
+      }
       Pos++;
    }
and running apt-get as follows:
bin/apt-get -o Debug::Acquire::http=true -o 
Dir::Bin::methods=/tmp/apt-0.8.3ubuntu7/bin/methods -s update
, I got the following error message that I cut after the first error to keep 
this report succinct:
--- 8< ------------------------------------------------------------------------
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
GET /de.archive.ubuntu.com/ubuntu/dists/maverick/Release.gpg HTTP/1.1
Host: localhost:3142
Connection: keep-alive
Cache-Control: max-age=0
Range: bytes=197-
If-Range: Sun, 10 Oct 2010 10:18:55 GMT
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET /de.archive.ubuntu.com/ubuntu/dists/maverick/main/i18n/Translation-en.bz2 
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/main/i18n/Translation-en_US.bz2 
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/multiverse/i18n/Translation-en.bz2 
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/multiverse/i18n/Translation-en_US.bz2
 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/restricted/i18n/Translation-en.bz2 
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/restricted/i18n/Translation-en_US.bz2
 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/universe/i18n/Translation-en.bz2 
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/universe/i18n/Translation-en_US.bz2
 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET /de.archive.ubuntu.com/ubuntu/dists/maverick-updates/Release.gpg HTTP/1.1
Host: localhost:3142
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


HTTP/1.0 200 OK
Connection: Keep-Alive
Accept-Ranges: bytes
Age: 785
ETag: "86081-c6-49240922fa1c0"
Content-Length: 198
Content-Type: text/plain
Last-Modified: Sun, 10 Oct 2010 10:18:55 GMT

GET /de.archive.ubuntu.com/ubuntu/dists/maverick/main/i18n/Translation-en.bz2 
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/main/i18n/Translation-en_US.bz2 
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/multiverse/i18n/Translation-en.bz2 
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/multiverse/i18n/Translation-en_US.bz2
 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/restricted/i18n/Translation-en.bz2 
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/restricted/i18n/Translation-en_US.bz2
 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/universe/i18n/Translation-en.bz2 
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick/universe/i18n/Translation-en_US.bz2
 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


GET /de.archive.ubuntu.com/ubuntu/dists/maverick-updates/Release.gpg HTTP/1.1
Host: localhost:3142
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


Ign http://localhost maverick Release.gpg
GET 
/de.archive.ubuntu.com/ubuntu/dists/maverick-updates/main/i18n/Translation-en.bz2
 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.3ubuntu7)


HTTP/1.1 302 Moved Temporarily
Connection: Keep-Alive
Content-Length: 0

<HTML><BODY><H2>Browser error!</H2>Browser does not support redirects!</BODY>
<!--
<?xml version="1.0" encoding="UTF-8"?>
<WISPAccessGatewayParam
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  
xsi:noNamespaceSchemaLocation="http://www.acmewisp.com/WISPAccessGatewayParam.xsd";>
<Redirect>
<AccessProcedure>1.0</AccessProcedure>
<AccessLocation>isocc=,cc=,ac=,network=Coova,</AccessLocation>
<LocationName>My_HotSpot</LocationName>
<LoginURL>https://coova.org/app/uam/auth?res=smartclient&amp;uamip=10.248.0.1&amp;uamport=3990&amp;challenge=725a1abc23601b9741727f00009d9765&amp;mac=00-22-43-2D-0F-6E&amp;ip=10.248.0.239&amp;called=00-16-3E-C5-A4-C6&amp;nasid=nas-folgaria&amp;md=6D85996B601978B358FDF6BC00555D8D</LoginURL>
<AbortLoginURL>http://10.248.0.1:3990/abort</AbortLoginURL>
<MessageType>100</MessageType>
<ResponseCode>0</ResponseCode>
</Redirect>
</WISPAccessGatewayParam>
-->

[Bad header line] The offending HTTP header line is  <!--
Ign http://localhost/de.archive.ubuntu.com/ubuntu/ maverick/main Translation-en
Err http://localhost/de.archive.ubuntu.com/ubuntu/ maverick/main 
Translation-en_US
  Bad header line [IP: 127.0.0.1 3142]
--- 8< ------------------------------------------------------------------------

Doing "apt-get update" without using apt-cacher does not have this problem.

I can help debug this if you tell me in which part of apt-cacher I should look 
into (i.e., I need to see the architecture of apt-cacher).

Thanks.

-- System Information:
Debian Release: squeeze/sid
  APT prefers maverick-updates
  APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 
'maverick')
Architecture: i386 (i686)

Kernel: Linux 2.6.35-28-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apt-cacher depends on:
ii  ed                      1.4-1build1      The classic UNIX line editor
ii  libdigest-sha1-perl     2.13-1           NIST SHA-1 message digest algorith
ii  libfilesys-diskspace-pe 0.05-13          fetch filesystem size and usage in
ii  libfreezethaw-perl      0.5001-1         module to serialize and deserializ
pn  libio-compress-bzip2-pe <none>           (no description available)
ii  libio-interface-perl    1.05-1           socket methods to get/set interfac
ii  libwww-curl-perl        4.11-1           Perl bindings to libcurl
ii  libwww-perl             5.836-1          Perl HTTP/WWW client/server librar
ii  perl [libio-compress-zl 5.10.1-12ubuntu2 Larry Wall's Practical Extraction 

Versions of packages apt-cacher recommends:
ii  libberkeleydb-perl         0.42-1ubuntu1 use Berkeley DB 4 databases from P

Versions of packages apt-cacher suggests:
pn  libio-socket-inet6-perl       <none>     (no description available)

-- Configuration Files:
/etc/apt-cacher/apt-cacher.conf changed:
cache_dir=/var/cache/apt-cacher
admin_email=root@localhost
daemon_port=3142
group=www-data
user=www-data
allowed_hosts=*
denied_hosts=
allowed_hosts_6=fec0::/16
denied_hosts_6=
generate_reports=0
clean_cache=0
offline_mode=0
logdir=/var/log/apt-cacher
expire_hours=0
use_proxy=0
use_proxy_auth=0
limit=0
debug=0

/etc/default/apt-cacher changed:
AUTOSTART=1


-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to