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

Language negotiation problem


it seems there is a problem with content language negotiation on
www.debian.org (and also mirrors, like www.fr.debian.org): although my
client declares it accepts "fr, en" (so French first), I only get english
pages. Even if I select the french page, following a link leads me to an
english one (which is coherent to language negotiation though).

To test my client (and because I'm not sure of the language negotiation
method used in other websites), I used this protocol:

1. open a netcat listener:
$ nc -l -p 8080

2. open http://localhost:8080 in the web client (Konqueror or Firefox),
and I get this from Firefox:

GET / HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv: Gecko/20060728 Firefox/ (Debian-1.5.dfsg+
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: fr-fr,fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: UTF-8,*
Keep-Alive: 300
Connection: keep-alive

and "Accept-Language: fr, en" from Konqueror.

I tried changing settings, like "it, en", it does change my test but
not www.debian.org's behaviour. But, with "it, es", I get Italian, with
"es, fr", I get French.

All languages, it, es, en, fr, are available as index.LANG.html.
So why is the behaviour different from times to times?
Sometimes I get the first listed language, sometimes English, or the last
Maybe I'm wrong, but it seems www.debian.org does something wrong,
doesn't it ?

 Sylvain Sauvage

Reply to: