Bug 131657 - Authorization dialog ignores charset of the web page
Summary: Authorization dialog ignores charset of the web page
Status: RESOLVED INTENTIONAL
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-01 15:34 UTC by Dmitry Kazarov
Modified: 2012-01-04 22:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (174 bytes, text/plain)
2008-05-18 23:32 UTC, Michael Leupold
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kazarov 2006-08-01 15:34:37 UTC
Version:           3.5.3 (using KDE 3.5.3, compiled sources)
Compiler:          gcc version 3.4.4 [FreeBSD] 20050518
OS:                FreeBSD (i386) release 6.1-STABLE

"Authorization Dialog" of konqueror ignores charset specified in Content-Type field of HTTP 401 Unauthorized replay and if the realm field is written in cyrillic it's displayed using wrong charset.

MSIE correctly displays realm.
Comment 1 Michael Leupold 2008-05-18 15:14:59 UTC
Unfortunately I'm not sure how to reproduce this bug. Where did you put the Content-type? Where did you put the cyrillic characters? Realm, header or content?
Comment 2 Dmitry Kazarov 2008-05-18 18:29:29 UTC
My .htaccess of protected directory:
AuthType Basic
AuthName '
Comment 3 Michael Leupold 2008-05-18 19:02:25 UTC
Where do you specifiy the Content-type? Does the server have a default 
content-type set?
Comment 4 Michael Leupold 2008-05-18 19:02:58 UTC
... forget my last comment - nonsense. I overlooked it :/
Comment 5 Dmitry Kazarov 2008-05-18 20:42:25 UTC
I've tried to reproduce problem. Now it's changed but still exist: I see correct message written using cp1251 (AuthName) even when Content-type specifies charset ISO-8859-1 - I've made error specifying access rights to  /Errors/HTTP_Unauthorized.html and Apache sent me built in error message.
Comment 6 Michael Leupold 2008-05-18 23:07:35 UTC
You can test it using: http://test.confuego.org/131657/
The encoding set for the AuthName is utf-8 - I'll attach the file for further reference.

I still get "jibberish" using 3.5.9. Using trunk r809039 crashed my kded4 but others testing it reported nothing showed up at all.
Comment 7 Michael Leupold 2008-05-18 23:32:23 UTC
Created attachment 24836 [details]
testcase

I rechecked again and again and I can't get anything to work. This is a file
like described in the report but I can't get cyrillic characters to display on
any browser I use (opera9, ff2, konqueror3/4, ie6, ie7). Maybe it's neccessary
to use a russian version of windows to use?
Comment 8 Dmitry Kazarov 2008-05-19 07:31:41 UTC
Many people report about problem with Cyrillic in non-Russian versions of MS Windows.
I've checked IE6, Firefox 2 and Konqueror 3 with different charsets.
IE6 (in russian windows) uses windows-1251 as encoding of 'realm' (AuthName) header and ignores Content-Type.
FF2 does not show Cyrillic in authorization dialog (it also has a lot of other errors in internationalization).
Konqueror 3 currently works as IE6 - it uses windows-1251 regardless of Content-Type header. I changed Konqueror's default encoding but it always uses windows-1251.
Comment 9 Dawit Alemayehu 2011-11-30 08:08:05 UTC
Sorry but the "Content-Type" header is used to relay the content's mime-type, not the stuff that is sent as a header. Moreover, RFC 2616 which deals with HTTP authentication has no provisions for doing what you are asking here.
Comment 10 Dawit Alemayehu 2012-01-04 22:04:27 UTC
See comment #9. Every browser tested (firefox, chromium, konqueror) show the same result with respect to the words written in Cyrillic.