[Bug 55399] Request English but Response Spanish Language (Default Locale)

2014-04-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55399

Konstantin Kolinko knst.koli...@gmail.com changed:

   What|Removed |Added

 CC||st...@rkbb.co.uk

--- Comment #9 from Konstantin Kolinko knst.koli...@gmail.com ---
*** Bug 56374 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55399] Request English but Response Spanish Language (Default Locale)

2013-08-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55399

--- Comment #8 from Guillermo Grandes guillermo.gran...@gmail.com ---
(In reply to Mark Thomas from comment #6)
 The error pages were simple to fix but fixing the HTTP response status line
 is going to be more invasive. That part may end up being Tomcat 8 only
 because of the internal changes required.

In that case, perhaps the logical would respond in English (ubiquitous) by
default, and set locale when requested... right?

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55399] Request English but Response Spanish Language (Default Locale)

2013-08-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55399

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #5 from Mark Thomas ma...@apache.org ---
This report doesn't surprise me at all.

The manager application had a similar issue.

I'll look at using a similar approach as used for the manager application for
the error pages.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55399] Request English but Response Spanish Language (Default Locale)

2013-08-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55399

--- Comment #6 from Mark Thomas ma...@apache.org ---
The error pages were simple to fix but fixing the HTTP response status line is
going to be more invasive. That part may end up being Tomcat 8 only because of
the internal changes required.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55399] Request English but Response Spanish Language (Default Locale)

2013-08-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55399

Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Mark Thomas ma...@apache.org ---
This has been fixed in trunk and 7.0.x and will be included in 7.0.43 onwards.

Error pages now use the Accept-Language header.

All responses use the Locale set on the response.

I considered parsing the Accept-Language header on every request and using that
to set the locale on every response but decided not to on performance grounds
(no hard numbers on this so if someone shows the performance impact is
negligible then it could get added). Users that want this can easily write a
filter to do so.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55399] Request English but Response Spanish Language (Default Locale)

2013-08-12 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55399

--- Comment #4 from Guillermo Grandes guillermo.gran...@gmail.com ---
java.lang.Throwable: Stack Trace
at org.test.servlet.LocaleTest.doPost(LocaleTest.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55399] Request English but Response Spanish Language (Default Locale)

2013-08-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55399

--- Comment #2 from Guillermo Grandes guillermo.gran...@gmail.com ---
Tested on tomcat-7.0.42

ServletWriter.println() don't work as expect (response.sendError clear the
response buffer), but changing ServletWriter to System.out output is:

protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// ...
System.out.println(request locale= + request.getLocale());
System.out.println(server locale= + Locale.getDefault());
response.sendError(HttpServletResponse.SC_BAD_REQUEST, BAD REQUEST);
}

--- Eclipse console ---
request locale=en
server locale=es_ES
---

# Request:
curl -i -H Accept-Language: en -d  http://x.x.x.x:8080/LocaleTest;
---
HTTP/1.1 400 Petición incorrecta
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 1010
Date: Sun, 11 Aug 2013 21:29:02 GMT
Connection: close

htmlheadtitleApache Tomcat/7.0.42 - Informe de Error/titlestyle!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}HR {color : #525D76;}--/style
/headbodyh1Estado HTTP 400 - BAD REQUEST/h1HR size=1
noshade=noshadepbtype/b Informe de estado/ppbmensaje/b uBAD
REQUEST/u/ppbdescripción/b uEl requerimiento enviado por el cliente
era sintácticamente incorrecto./u/pHR size=1
noshade=noshadeh3Apache Tomcat/7.0.42/h3/body/html
---

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55399] Request English but Response Spanish Language (Default Locale)

2013-08-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55399

--- Comment #3 from Christopher Schultz ch...@christopherschultz.net ---
That's certainly odd. How about this:

System.out.println(current stack:);
new Throwable(Stack Trace).printStackTrace();

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55399] Request English but Response Spanish Language (Default Locale)

2013-08-10 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55399

Christopher Schultz ch...@christopherschultz.net changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Christopher Schultz ch...@christopherschultz.net ---
What version of Tomcat?

Can you echo these items back to the client and post the output:

protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//  ...
ServletWriter out = response.getWriter();
out.println(request locale= + request.getLocale());
out.println(server locale= + Locale.getDefault());
response.sendError(HttpServletResponse.SC_BAD_REQUEST, BAD REQUEST);
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org