httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 39730] New: - LanguagePriority is case sensitive, but not documented as such
Date Tue, 06 Jun 2006 04:45:31 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39730>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39730

           Summary: LanguagePriority is case sensitive, but not documented
                    as such
           Product: Apache httpd-2
           Version: 2.0.54
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: mod_negotiation
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: bugzilla@vampire.com.hk


I had difficulty in getting language negotiation working because I didn't
realise LanguagePriority was case sensitive... this is inconsistent with the
behaviour of AddLanguage.
(I found this in version 2.0.54, but I've looked through the latest CHANGES file
and not found anything indicating there has been a change on this)

My server configuration included:

AddLanguage en .en 
AddLanguage zh-TW .zh-TW 
AddLanguage zh-CN .zh-CN 
LanguagePriority en zh-TW zh-CN fr de it ja
ForceLanguagePriority Prefer Fallback

If a client preferred Chinese, but none was available, the English version was
served - seeing this, I thought it was working.

However, if the client preferred English and none was available, the "406 Not
Acceptable" error was returned instead of a Chinese version.

I changed the LanguagePriority directive to:
LanguagePriority en zh-tw zh-TW zh-cn zh-CN fr de it ja
and it worked in both cases. I conclude that the LanguagePriority directive does
case-sensitive matching.

Interestingly, the 406 error page included the text:

"Available variants:

    * haribo.html.zh-CN , type text/html, language zh-cn
    * haribo.html.zh-TW , type text/html, language zh-tw"

So the AddLanguage directive does fold the languge codes to lower case.

I suggest:
1. Add a note to the LanguagePriority directive documentation saying it is
case-sensitive

or

2. Change the behaviour of LanguagePriority so it is case-insensitive.

(2) would be preferable, and it matches the behaviour of AddLanguage.

Thanks.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message