Re: apt with index diff support
* Goswin von Brederlow:
> Doesn't the 'If-Range: Fri, 28 Oct 2005 19:18:20 GMT' mean the proxy
> should query upstream? Also what is the time to live on the reply? And
> shouldn't the proxy always query for an update if the TTL is gone?
Indeed, I should have looked at the ngrep output more closely. It
turns out that this clearly apt-proxy's fault. The patch below should
fix this (it's only lightly tested, though).
diff -rN -u old-apt-proxy-1.9.32/apt_proxy/apt_proxy.py new-apt-proxy-1.9.32/apt_proxy/apt_proxy.py
--- old-apt-proxy-1.9.32/apt_proxy/apt_proxy.py 2005-10-30 11:04:52.000000000 +0100
+++ new-apt-proxy-1.9.32/apt_proxy/apt_proxy.py 2005-10-30 11:04:52.000000000 +0100
@@ -89,8 +89,8 @@
FileType(re.compile(r"\.txt$"), "application/plain-text", 1),
FileType(re.compile(r"\.html$"), "application/text-html", 1),
- FileType(re.compile(r"/(Packages|Release(\.gpg)?|Sources|Contents-.*)"
- r"(\.(gz|bz2))?$"),
+ FileType(re.compile(r"/(Packages|Release(\.gpg)?|Sources|Index"
+ r"|(?:Contents|Translation)-.*)(\.(gz|bz2))?$"),
"text/plain", 1),
FileType(re.compile(r"\.rpm$"), "application/rpm", 0),
diff -rN -u old-apt-proxy-1.9.32/debian/changelog new-apt-proxy-1.9.32/debian/changelog
--- old-apt-proxy-1.9.32/debian/changelog 2005-10-30 11:04:52.000000000 +0100
+++ new-apt-proxy-1.9.32/debian/changelog 2005-10-30 11:04:52.000000000 +0100
@@ -1,3 +1,10 @@
+apt-proxy (1.9.32.1) unstable; urgency=low
+
+ * Non-maintainer upload
+ * Map type of "Index" and "Translation-*" files to text/plain.
+
+ -- Florian Weimer <fw@deneb.enyo.de> Sun, 30 Oct 2005 11:04:48 +0100
+
apt-proxy (1.9.32) unstable; urgency=low
[ Chris Halls ]
Reply to: