error parsing HTTP Status-Line

Bug #411435 reported by Witold Baryluk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Debian)
Fix Released
Unknown
apt (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: apt

Version: 0.7.20.2ubuntu6
Description: Ubuntu 9.04
Release: 9.04

root@Lena:/home/viktor# apt-get update -o Debug::Acquire::http=true
0% [Pracuje]GET /ubuntu/dists/jaunty/Release.gpg HTTP/1.1
Host: pl.archive.ubuntu.com
Connection: keep-alive
User-Agent: Ubuntu APT-HTTP/1.3 (0.7.20.2ubuntu6)

GET /ubuntu/dists/jaunty/multiverse/i18n/Translation-pl.bz2 HTTP/1.1
Host: pl.archive.ubuntu.com
Connection: keep-alive
If-Modified-Since: Tue, 09 Jun 2009 13:03:09 GMT
User-Agent: Ubuntu APT-HTTP/1.3 (0.7.20.2ubuntu6)

HTTP/1.0 200 OK
Date: Mon, 10 Aug 2009 13:32:09 GMT
Server: Apache/2.2.0 (Unix)
Last-Modified: Wed, 22 Apr 2009 21:35:26 GMT
ETag: "ad699-bd-4682b8aa82380"
Accept-Ranges: bytes
Content-Length: 189
Content-Type: text/plain
Age: 644
X-Cache: HIT from localhost
X-Cache-Lookup: HIT from localhost:19371
Via: 1.0 localhost (squid/3.0.STABLE8)
Proxy-Connection: keep-alive

Pob: 1 http://pl.archive.ubuntu.com jaunty Release.gpg [189B]
98% [Podłączanie do pl.archive.ubuntu.com (153.19.251.225)]GET /ubuntu/dists/jaunty/multiverse/i18n/Translation-pl.bz2 HTTP/1.1
Host: pl.archive.ubuntu.com
Connection: keep-alive
If-Modified-Since: Tue, 09 Jun 2009 13:03:09 GMT
User-Agent: Ubuntu APT-HTTP/1.3 (0.7.20.2ubuntu6)

HTTP/1.0 304
Date: Sat, 08 Aug 2009 14:06:13 GMT
Content-Type: text/plain
Last-Modified: Tue, 09 Jun 2009 13:03:09 GMT
Age: 171400
Warning: 113 localhost (squid/3.0.STABLE8) This cache hit is still fresh and more than 1 day old
X-Cache: HIT from localhost
X-Cache-Lookup: HIT from localhost:19371
Via: 1.0 localhost (squid/3.0.STABLE8)
Proxy-Connection: keep-alive

Błąd http://pl.archive.ubuntu.com jaunty/multiverse Translation-pl
  Serwer HTTP przysłał nieprawidłowy nagłówek odpowiedzi
...
Other requests...

 Serwer HTTP przysłał nieprawidłowy nagłówek odpowiedzi <- means HTTP server send incorect header in respone.

Lets look at this response from squid3 cache. It is "HTTP/1.0 304 " with trailing space and empty reason phrase. According to rfc2616 section 6.1.1:

 Reason-Phrase = *<TEXT, excluding CR, LF>

so it can be empty. I will bet that this is the problem.

Regards.

Revision history for this message
Witold Baryluk (baryluk) wrote :

I found the problem in apt-0.7.20.2ubuntu6/methods/http.cc line 549, calls:

if (sscanf(Line.c_str(),"HTTP/%u.%u %u %[^\n]",&Major,&Minor,
    &Result,Code) != 4)
    return _error->Error(_("The HTTP server sent an invalid reply header"));

according to manual page of sscanf(3) line 215,

       [ Matches a non-empty sequence of characters from the specified
              set of accepted characters; ...

"non-empty" So this is the problem.

Revision history for this message
Witold Baryluk (baryluk) wrote :

Debian Bug #411435 is about the same issue. There is also a patch proposed for this issue.

Revision history for this message
Witold Baryluk (baryluk) wrote :

Sorry, mistake.

Debian Bug #531157, previously posted is Ubuntu one.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531157

BTW. Why launchpad don't have preview option?

Jorge Castro (jorge)
Changed in apt (Ubuntu):
status: New → Triaged
Changed in apt (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (10.0 KiB)

This bug was fixed in the package apt - 0.7.23.1ubuntu1

---------------
apt (0.7.23.1ubuntu1) karmic; urgency=low

  [ Matt Zimmerman ]
  * apt-pkg/deb/dpkgpm.cc:
    - Suppress apport reports on dpkg short reads (these I/O errors are not
      generally indicative of a bug in the packaging)

  [ Loïc Minier ]
  * cmdline/apt-key:
    - Emit a warning if removed keys keyring is missing and skip associated
      checks (LP: #218971)

  [ Brian Murray ]
  * cmdline/apt-get.cc:
    - typo fix (LP: #370094)

  [ Michael Vogt ]
  * apt-pkg/deb/dpkgpm.cc:
    - when tcgetattr() returns non-zero skip all pty magic
      (thanks to Simon Richter, closes: #509866)
  * apt-inst/contrib/arfile.cc:
    - show propper error message for Invalid archive members
  * apt-pkg/acquire-worker.cc:
    - show error details of failed methods
  * apt-pkg/contrib/fileutl.cc:
    - if a process aborts with signal, show signal number
  * methods/http.cc:
    - ignore SIGPIPE, we deal with EPIPE from write in
      HttpMethod::ServerDie() (LP: #385144)
  * debian/apt.cron.daily:
    - if the timestamp is too far in the future, delete it
      (LP: #135262)

  [ Merge ]
  * merged from debian, reverted the libdlopen-udev branch
    because its too late in the release process for this now
  * not merged the proxy behaviour change from 0.7.23 (that will
    be part of lucid)

apt (0.7.23.1) unstable; urgency=low

  [ Michael Vogt ]
  * apt-pkg/pkgcache.cc:
    - do not set internel "needs-configure" state for packages in
      triggers-pending state. dpkg will deal with the trigger and
      it if does it before we trigger it, dpkg will error out
      (LP: #414631)
  * apt-pkg/acquire-item.cc:
    - do not segfault on invalid items (closes: #544080)

apt (0.7.23) unstable; urgency=low

  [ David Kalnischkies ]
  * cmdline/apt-get.cc:
    - add APT::Get::HideAutoRemove=small to display only a short line
      instead of the full package list. (Closes: #537450)
    - ShowBroken() in build-dep (by Mike O'Connor, Closes: #145916)
    - check for statfs.f_type (by Robert Millan, Closes: #509313)
    - correct the order of picked package binary vs source in source
    - use SourceVersion instead of the BinaryVersion to get the source
      Patch by Matt Kraai, thanks! (Closes: #382826)
    - add pkg/archive and codename in source (Closes: #414105, #441178)
  * apt-pkg/contrib/strutl.cc:
    - enable thousand separator according to the current locale
      (by Luca Bruno, Closes: #223712)
  * doc/apt.conf.5.xml:
    - mention the apt.conf.d dir (by Vincent McIntyre, Closes: #520831)
  * apt-inst/contrib/arfile.cc:
    - use sizeof instead strlen (by Marius Vollmer, Closes: #504325)
  * doc/apt-mark.8.xml:
    - improve manpage based on patch by Carl Chenet (Closes: #510286)
  * apt-pkg/acquire-item.cc:
    - use configsettings for dynamic compression type use and order.
      Based on a patch by Jyrki Muukkonen, thanks! (LP: #71746)
  * apt-pkg/aptconfiguration.cc:
    - add default configuration for compression types and add lzma
      support. Order is now bzip2, lzma, gzip, none (Closes: #510526)
  * ftparchive/writer.cc:
    - add lzma support also here, patch for this (and...

Changed in apt (Ubuntu):
status: Triaged → Fix Released
Changed in apt (Debian):
status: Unknown → Fix Released
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.