[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#427909: apt: should honor 3?? (301, 302 - moved) HTTP return codes



Package: apt
Version: 0.6.46.4-0.1
Severity: wishlist

I maintain an apt repository (a Debian mirror, actually) that has a
considerable amount of users. Recently, due to serious space problems,
we had to move the repository to a new server, and due to reasons beyond
the scope of this report, this new server has a new address.

What I wanted to do was to make sure that the old server return "301
permenantly moved" HTTP error code on requests. An http client should
honor these requests. In fact, this works well enough for wget and
mozilla to use the old URLs without noticing anything changed.

Apt, however, does not honor 301, and lists it as error. It is still
better for me than the alternative, as it means that the user at least
has a hint why things failed.

Here's how I think APT should handle these cases:
On most of the 300 return codes - get the package from the alternative
location.
On 301 - Update /etc/apt/sources.list with the new location, leaving the
old one commented out with an explanation why it made the change along
with a timestamp.

This behaviour, as far as I can tell, is backed up by the definition of
the 300 codes in the HTTP protocol.

-- Package-specific info:

-- (no /etc/apt/preferences present) --


-- (/etc/apt/sources.list present, but not submitted) --


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=en_US, LC_CTYPE=he_IL (charmap=ISO-8859-8)

Versions of packages apt depends on:
ii  debian-archive-keyring      2007.02.19   GnuPG archive keys of the Debian a
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libgcc1                     1:4.1.1-21   GCC support library
ii  libstdc++6                  4.1.1-21     The GNU Standard C++ Library v3

apt recommends no packages.

-- no debconf information



Reply to: