Bug 56374 - Page in wrong language - getting lower rank Accept-Language in request header
Summary: Page in wrong language - getting lower rank Accept-Language in request header
Status: RESOLVED DUPLICATE of bug 55399
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Manager (show other bugs)
Version: unspecified
Hardware: Macintosh All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-09 11:51 UTC by Steve Root
Modified: 2014-04-10 09:08 UTC (History)
0 users



Attachments
Language preference showing EN-FR-ES test (295.82 KB, image/png)
2014-04-09 11:51 UTC, Steve Root
Details
EN_getEN screenshot showing header request and result page (324.09 KB, image/png)
2014-04-09 11:52 UTC, Steve Root
Details
EN-ES_getES screenshot showing header request and result page (319.35 KB, image/png)
2014-04-09 11:53 UTC, Steve Root
Details
EN-ES-FR_getES screenshot showing header request and result page (325.72 KB, image/png)
2014-04-09 11:54 UTC, Steve Root
Details
EN-FR_getFR screenshot showing header request and result page (334.95 KB, image/png)
2014-04-09 11:55 UTC, Steve Root
Details
EN-FR-ES_getES screenshot showing header request and result page (326.47 KB, image/png)
2014-04-09 11:56 UTC, Steve Root
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Root 2014-04-09 11:51:38 UTC
Created attachment 31492 [details]
Language preference showing EN-FR-ES test

A fresh install of Tomcat7 on Debian.
going to: http://mysever.com:8080/manager/html/ , after logging in, I get the page in French rather than English.

Investigating further, my browser (Chrome)is set to accept multiple languages in order of priority and this is confirmed when I checked the header request:

Chrome:
Accept-Language:en-GB,en;q=0.8,en-US;q=0.6,fr;q=0.4

When I visited the page using Firefox, I got the page in English.
Firefox:
Accept-Language:"en-us,en;q=0.5"
See EN_getEN.png

When I add FR to firefox as a lower priority language, I get: FR
Firefox:
Accept-Language:"en-us,en;q=0.7,fr;q=0.3"
See EN-FR_getFR.png

To test further, I started adding spanish.

When I add ES to firefox as a lower priority language, I get: ES
Firefox:
Accept-Language:"en-us,en;q=0.7,es;q=0.3"
See EN-ES_getES.png

When I add FR then ES (with ES as lowest priority language), I get: ES
Firefox:
Accept-Language:"en-us,en;q=0.8,fr;q=0.5,es;q=0.3"
See EN-FR-ES_getES.png

And just when it looked like the server was sending the lowest priority language, I add ES then FR (with FR as lowest prioity language, I get: ES!!
Firefox:
Accept-Language:"en-us,en;q=0.8,es;q=0.5,fr;q=0.3"
See EN-ES-FR_getES.png

I've a screen shots showing each request and the resulting page, I'll add them to this bug report in a moment.
Comment 1 Steve Root 2014-04-09 11:52:49 UTC
Created attachment 31493 [details]
EN_getEN screenshot showing header request and result page
Comment 2 Steve Root 2014-04-09 11:53:59 UTC
Created attachment 31494 [details]
EN-ES_getES screenshot showing header request and result page
Comment 3 Steve Root 2014-04-09 11:54:36 UTC
Created attachment 31495 [details]
EN-ES-FR_getES screenshot showing header request and result page
Comment 4 Steve Root 2014-04-09 11:55:27 UTC
Created attachment 31496 [details]
EN-FR_getFR screenshot showing header request and result page
Comment 5 Steve Root 2014-04-09 11:56:25 UTC
Created attachment 31497 [details]
EN-FR-ES_getES screenshot showing header request and result page
Comment 6 Konstantin Kolinko 2014-04-09 12:12:35 UTC
> A fresh install of Tomcat7 on Debian.

Last time when I was looking, a "fresh" Tomcat on Debian was actually X years old, where X was ~2 or 3.

1. What exactly x.y.z version are you using?
2. Is it reproducible with 7.0.53?

https://wiki.apache.org/tomcat/FAQ/Linux_Unix#Q5
Comment 7 Steve Root 2014-04-09 12:40:59 UTC
Good question; On Debian 7 (wheezy) I used:
# apt-get install tomcat7 tomcat7-admin
and I got
Apache Tomcat/7.0.28

I'll go create a new server and try it on 7.0.53 and report back.
Thanks
Comment 8 Steve Root 2014-04-09 14:36:18 UTC
It's fine on 7.0.53
Thanks!
Comment 9 Christopher Schultz 2014-04-10 08:06:52 UTC
Possible duplicate of bug #55399?
Comment 10 Konstantin Kolinko 2014-04-10 09:08:20 UTC
(In reply to Christopher Schultz from comment #9)
> Possible duplicate of bug #55399?

Yes, I think it is.

*** This bug has been marked as a duplicate of bug 55399 ***