You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2007/03/16 16:02:33 UTC

DO NOT REPLY [Bug 39730] - LanguagePriority and DefaultLanguage are Case Sensitive at Content Negotiation

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


imacat@mail.imacat.idv.tw changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|minor                       |normal
            Summary|LanguagePriority is case    |LanguagePriority and
                   |sensitive, but not          |DefaultLanguage are Case
                   |documented as such          |Sensitive at Content
                   |                            |Negotiation
            Version|2.0.54                      |2.2.4




------- Additional Comments From imacat@mail.imacat.idv.tw  2007-03-16 08:02 -------
    Hi.  This is imacat from Taiwan.  I wonder why there is no answer or update
to this bug yet for more than 9 months.

    I fould that not only LanguagePriority, but DefaultLanguage is also
case-sensitive, too.  But they shouldn't, since (1) Apache documentation did not
state it in any place, (2) ISO-636 Language Codes themselves are not case-sensitive.

    The following console log demostrate this bug.  The only difference of
httpd-lc.conf and httpd-uc.conf is that in httpd-lc.conf LanguagePriority and
DefaultLanguage specify language in different cases, while in httpd-uc.conf they
are the same.

    Please tell me if you need any more information, or if I can be of any help.
 Thank you.

======================
imacat@rinse ~ % ls /tmp/apache/htdocs
page.html  page.xhtml
imacat@rinse ~ % cat /tmp/apache/htdocs/page.html
This is page.html.
imacat@rinse ~ % cat /tmp/apache/htdocs/page.xhtml
This is page.xhtml.
You have new mail.
imacat@rinse ~ % cat /tmp/apache/httpd-lc.conf
User nobody
Group nogroup
ServerName localhost
ServerAdmin webmaster@localhost
ServerRoot /tmp/apache
DocumentRoot /tmp/apache/htdocs
PidFile /tmp/apache/httpd.pid
LoadModule mime_module /usr/lib/apache2/mod_mime.so
LoadModule negotiation_module /usr/lib/apache2/mod_negotiation.so
Listen 50080
ErrorLog /tmp/apache/error_log
Options +MultiViews
AddType application/xhtml+xml .xhtml
AddType text/html .html
ForceLanguagePriority Prefer Fallback

LanguagePriority zh-TW
DefaultLanguage zh-tw
imacat@rinse ~ % /usr/sbin/httpd -f /tmp/apache/httpd-lc.conf
imacat@rinse ~ % telnet localhost 50080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /page HTTP/1.1
Host: localhost
Accept-Language: en
Connection: close

HTTP/1.1 406 Not Acceptable
Date: Fri, 16 Mar 2007 14:40:19 GMT
Server: Apache/2.2.4 (Unix)
Alternates: {"page.html" 1 {type text/html} {language zh-tw} {length 19}},
{"page.xhtml" 1 {type application/xhtml+xml} {language zh-tw} {length 20}}
Vary: negotiate,accept
TCN: list
Content-Length: 452
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>406 Not Acceptable</title>
</head><body>
<h1>Not Acceptable</h1>
<p>An appropriate representation of the requested resource /page could not be
found on this server.</p>
Available variants:
<ul>
<li><a href="page.html">page.html</a> , type text/html, language zh-tw</li>
<li><a href="page.xhtml">page.xhtml</a> , type application/xhtml+xml, language
zh-tw</li>
</ul>
</body></html>
Connection closed by foreign host.
imacat@rinse ~ % kill $(<//tmp/apache/httpd.pid)
imacat@rinse ~ % cat /tmp/apache/httpd-uc.conf
User nobody
Group nogroup
ServerName localhost
ServerAdmin webmaster@localhost
ServerRoot /tmp/apache
DocumentRoot /tmp/apache/htdocs
PidFile /tmp/apache/httpd.pid
LoadModule mime_module /usr/lib/apache2/mod_mime.so
LoadModule negotiation_module /usr/lib/apache2/mod_negotiation.so
Listen 50080
ErrorLog /tmp/apache/error_log
Options +MultiViews
AddType application/xhtml+xml .xhtml
AddType text/html .html
ForceLanguagePriority Prefer Fallback

LanguagePriority zh-TW
DefaultLanguage zh-TW
imacat@rinse ~ % /usr/sbin/httpd -f /tmp/apache/httpd-uc.conf
imacat@rinse ~ % telnet localhost 50080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /page HTTP/1.1
Host: localhost
Accept-Language: en
Connection: close

HTTP/1.1 200 OK
Date: Fri, 16 Mar 2007 14:40:33 GMT
Server: Apache/2.2.4 (Unix)
Content-Location: page.html
Vary: negotiate,accept
TCN: choice
Last-Modified: Fri, 16 Mar 2007 14:32:44 GMT
ETag: "2a955c-13-42bcc1cd6bb00;42bcc1b870980"
Accept-Ranges: bytes
Content-Length: 19
Connection: close
Content-Type: text/html
Content-Language: zh-TW

This is page.html.
Connection closed by foreign host.
imacat@rinse ~ % kill $(<//tmp/apache/httpd.pid)
imacat@rinse ~ %


-- 
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