Bug 127703 - konqueror: doesn't support proper content negotiation
Summary: konqueror: doesn't support proper content negotiation
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Unmaintained
Component: http (show other bugs)
Version: 3.5
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-20 10:49 UTC by Pierre Habouzit
Modified: 2011-11-30 14:58 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Habouzit 2006-05-20 10:49:13 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Debian testing/unstable Packages

from debian bug http://bugs.debian.org/358459
=============================================

 From: Jens Seidel <jensseidel AT users.sf.net>
 Date: Wed, 22 Mar 2006 21:17:34 +0100

 Package: konqueror
 Version: 4:3.5.1-1
 Severity: normal

 Hi,

 I noticed that konqueror isn't able to fetch German pages from
 www.de.debian.org via content negotiation. Other browsers such as
 firebird and lynx work.  Konqueror works well on other mirrors such as
 us, nl, fr.

 $ HEAD -H "Accept-Language: de" http://www.de.debian.org
 contains:
 Content-Language: de-lu
 Content-Location: index.de.html
 Content-Type: text/html

 nevertheless I get only English pages.

 I selected de_DE locale in controlcenter and also edited
 ~/.kde/share/config/kio_httprc and set Language=de. No success.

 See http://lists.debian.org/debian-www/2006/03/msg00218.html for more
 details.

 Jens

=======================================================================

I can confirm the problem, the content negociation does not work for french either, whereas:

[madcoder hades] HEAD -H "Accept-Language: fr" http://www.de.debian.org
[...]
ETag: "2731322-3bbe-6eb13140"
Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2
Vary: negotiate,accept-language
Content-Language: fr
Content-Length: 15294
Content-Location: index.fr.html
Content-Type: text/html
[...]
Comment 1 Thomas Bigot 2007-02-02 14:37:46 UTC
The problem is simple : konqueror does not send languages with proper priorities.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

You can see it on my website which displays the value of sent Accept-Language in http headers : http://tmgo.free.fr/accept-language

For example, my system is set in french, and the value of accept language is "fr, en". According to the RFC, it means that I accept indistinctively french or english. I think it's not a good behaviour. Kiohttp should send 
fr, en;q=0.5
to let me loading pages in french when available.

If you want to change that, you can modify ~/.kde/share/config/kio_httprc and add a line :
Languages=fr
if you want french for example.
(with a final S, Jens, debian pages are wrong ;-) )
Comment 2 Daniël Mantione 2007-02-02 14:50:39 UTC
I think "en" should not be added at all. The web server is free to send the page in English if French is not available, or send a "HTTP Not acceptable" back with a list of languages available (of which the browser then can then show the user a list).

For example someone with Ukrainian as mother tongue sets his KDE to Ukrainian. He speaks Russian but not English. Now he visits a web site which has both English and Russian available. With the KDE behaviour the web server would return the page in English.

With Accept-Language: uk, the webserver could send a HTTP Not acceptable indicating the page is available in English and Ukrainian. Konqueror could then show a popup, allowing the user to choose. Konqueror could even do things as to remember the language chosen for each web site, just like it can do for passwords. HTTP rules! It just needs to be taken advantage of.
Comment 3 JC Cardot 2007-04-14 23:40:40 UTC
IMHO Daniël is right. How is it working in firef0x?
by the way I have the same problem here, with KDE 3.5.4 (Mandriva 2007)
Comment 4 Hans-J. Ullrich 2007-06-23 10:47:37 UTC
I can confirm this too. My normal language is German (in my case), and the site is always displayed in English. Well, I can turn to German manually, then the site is displayed in German, but every link from this site (i.e. Newsletter) , will be turned to English again. 

This behavior appeared in an older version of konqueror in the past, but was then fixed. Now it is again (since the last 4-6 versions).

So, I think, the reason will be found again, mybe it is the same ? 

Regards

Hans
Comment 5 Stefan Kombrink 2008-05-18 13:07:40 UTC
I can confirm this bug with KDE 4.0.4 kubuntu hardy.
Despite reporting de,en at http://tmgo.free.fr/accept-language http://www.de.debian.org displays in english only.

 
Comment 6 Juha Tuomala 2008-09-28 13:14:13 UTC
This has been something that annoyed me too. This is basic functionality and should work.
Comment 7 Christian González 2009-02-20 23:39:43 UTC
Can confirm this in Konqueror 4.2.00
This is still not fixed.
the user agent contains "de, en-US, en" and I am not able to change this.
I always see the English version of the pages first.

This is _basic_ behaviour, bugs like this one keep people from using konqueror.
Forget things like xtra features, if those things dont work (language of websites,  being able to use more than one passwords per site, etc.) konqueror will never become a serious browser...
Please, please just fix it.
Comment 8 advocatux 2009-08-10 04:37:19 UTC
This bug is still present in Konqueror version 4.2.4

Just for the testimony.
Comment 9 Raúl 2010-04-21 18:01:11 UTC
Hello:

I confirm this bug as well on 4.3.4. I needed to tweak ~/.kde/share/config/kio_httprc to get the automatic language feature to work.

I'll try to provide info with 4.4.2 soon.

Regards,
Comment 10 Dawit Alemayehu 2011-11-30 06:54:11 UTC
This should work correctly even in KDE 3.5. Can anyone here follow the instructions outlined at

http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_IOSlaves#GUI

to enable debugging output for kio_http and provide the headers it sends to the server ? The "Accept-Language" header should reflect the correct values as set in the system settings panel.
Comment 11 advocatux 2011-11-30 08:32:08 UTC
It seems to work fine now in Konqueror 4.6.5 (current Debian Testing).
Comment 12 Dawit Alemayehu 2011-11-30 14:58:48 UTC
(In reply to comment #11)
> It seems to work fine now in Konqueror 4.6.5 (current Debian Testing).

Ok, thanks for the update.