Hi folks, > I also tried to prevent the "negatiation" from happening by passing > "Accept-Encoding: identity" in the HTTP request using wget, but that > didn't help
I just realized that this is not about Accept-Encoding, but the
"Accept:" header. If apt would send an Accept: text/plain header, the
mirror replies with 406 Not Acceptable instead.
matthijs@grubby:~$ wget -O /dev/null --header='Accept: text/plain'
--server-response
http://ftp.ch.debian.org/mirror/debian/dists/wheezy/main/i18n/Translation-en
--2012-01-27 22:50:32--
http://ftp.ch.debian.org/mirror/debian/dists/wheezy/main/i18n/Translation-en
Resolving ftp.ch.debian.org (ftp.ch.debian.org)... 129.132.86.210
Connecting to ftp.ch.debian.org (ftp.ch.debian.org)|129.132.86.210|:80...
connected.
HTTP request sent, awaiting response...
HTTP/1.1 406 Not Acceptable
Date: Fri, 27 Jan 2012 21:50:32 GMT
Server: Apache/2.2.16 (Debian)
Alternates: {"Translation-en.bz2" 1 {type application/x-bzip2} {length
3700790}}
Vary: negotiate
TCN: list
Content-Length: 504
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
2012-01-27 22:50:32 ERROR 406: Not Acceptable.
Note sure what sending an Accept header does to other mirrors, though. It seems
Apache ignores it normally (happily returning application/x-bzip2 when you
Accept: text/plain only, if you use a .bz2 url). Only when multiviews are
enabled and the url does not have an extension, Apache looks at the Accept
header (Disclaimer: I haven't looked into Apache documentation and did a short
test with a sample size of 1, so please verify this). In any case, sending the
mime type you except in the Accept header should just work for compliant HTTP
servers. Alternatively, just sending the Accept headers for the uncompressed
case could make sense too.
Gr.
Matthijs
signature.asc
Description: Digital signature

