Hi! On Sun, 2011-03-20 at 15:50 +0000, Mark Hindley wrote:
> > Specifically, the file to be downloaded does not exist but instead of > > passing 404 to the client, apt-cacher returns 302 by, I think, reading > > an invalid cached header. I am wondering how can the invalid header > > exists in the very first place if the file never exists in the server. > > I suspect it appeared as the CURLOPT_FOLLOWLOCATION was not set. It turned out that it is not about the redirection. The real problem is as follows: My machine is connected through the Internet via a controlled hotspot that disconnects a wireless connection after some hours of being connected and requires the user to re-login. I think "apt-get update" behavior is to probe several non-existent file like Translation-en.bz2. If the wireless connection had been active, apt-cacher would have contacted the server and returned 404. This would have made apt-get continues probing happily. Unfortunately, the wireless connection was not active. So, apt-cacher sent request for the non-existent file and got 302 from the Coova (OpenWRT-derivative) of the hotspot in attempt to tell apt-cacher to go to the login page of the hotspot provider. This 302 header from Coova is then cached by apt-cacher and returned to the apt-get causing "Bad header line". Once I saw "Bad header line", I realized that the wireless connection was disconnected. I re-logged-in and restarted the apt-get operation. Then, during the normal apt-get probe, the server returns 404 to apt-cacher and, because apt-cacher has got a cached header file from Coova, apt-cacher returns that header (containing 302) to apt-get preventing apt-get to happily continue probing. A quick solution is to remove all 302 headers returned by Coova from apt-cacher's cache. But, if it is possible, I want to have a long-term solution as well. What semantic does 404 have in apt-cacher? Does the semantic allow for not using cached header in case apt-cacher gets 404 referring to the above scenario where "apt-get update" probes for non-existent files? Thanks. > Mark -- Best regards, Eus (FSF member #4445) In this digital era, where computing technology is pervasive, your freedom depends on the software controlling those computing devices. Join free software movement today! It is free as in freedom, not as in free beer! Join: http://www.fsf.org/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org