[
https://issues.apache.org/jira/browse/WINK-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783889#action_12783889
]
Bryant Luk commented on WINK-235:
---------------------------------
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.10
Locale.toString() was called in the FlushResultHandler (in flushHeaders) but it
was an incorrect format (my mistake in earlier description).
"en_US" is incorrect (which is what Locale.toString() produces). Should really
use HeaderUtils.localeToLanguage() instead in ResponseBuilderImpl to produce
"en-US".
{code}
@GET
public Response getSomething() {
return Response.ok("Hello world!").language(Locale.US).build();
}
{code}
> Fix issue with using Locale objects inside ResponseBuilder
> ----------------------------------------------------------
>
> Key: WINK-235
> URL: https://issues.apache.org/jira/browse/WINK-235
> Project: Wink
> Issue Type: Bug
> Components: Common
> Affects Versions: 0.1, 1.0
> Reporter: Bryant Luk
> Assignee: Bryant Luk
> Fix For: 1.1
>
>
> Using a Locale object will not always produce the correct HTTP response
> header. Should explicitly call toString on it in the ResponseBuilder for the
> Content-Language header to be set.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.