You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ServletResponse#setlocale() is described in the servlet spec as bellow(*), so I think it is a bug.:
In the case of HTTP, the locale is communicated via the Content-Language header, the character encoding as part of the Content-Type header for text media types.
(*) When accessed via http1.1, Content-Language Header is added to response as below:
# curl --http1.1 -s -k -i -X GET "http://localhost:8080/setlocale/sample"
HTTP/1.1 200 OK
Server: Eclipse GlassFish 6.2.3
X-Powered-By: Servlet/5.0 JSP/3.0(Eclipse GlassFish 6.2.3 Java/Eclipse Foundation/11)
Content-Language: en
Content-Length: 14
Hello, World!
Environment
Server
GlassFish (using grizzly-3.0.1 )
JDK
# java -version
openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7)
OpenJDK 64-Bit Server VM Temurin-11.0.12+7 (build 11.0.12+7, mixed mode)
OS
CentOS Linux release 7
Steps to reproduce by glassfish
start-domain
deploy app setlocale.war
# asadmin deploy setlocale.war
Access app by follwing command.
#curl --http2 -s -k -i -X GET "http://localhost:8080/setlocale/sample"
Problem Description
Content-Language Header is not added to http2 response despite using ServletResponse#setlocale().
setlocale.zip
ServletResponse#setlocale() is described in the servlet spec as bellow(*), so I think it is a bug.:
(*) When accessed via http1.1, Content-Language Header is added to response as below:
Environment
GlassFish (using grizzly-3.0.1 )
CentOS Linux release 7
Steps to reproduce by glassfish
Impact of issue
This is violation of the API spec.
https://javadoc.io/doc/jakarta.servlet/jakarta.servlet-api/latest/jakarta/servlet/ServletResponse.html#setLocale-java.util.Locale-
The text was updated successfully, but these errors were encountered: