incubator-wink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryant Luk (JIRA)" <j...@apache.org>
Subject [jira] Commented: (WINK-235) Fix issue with using Locale objects inside ResponseBuilder
Date Mon, 30 Nov 2009 22:25:25 GMT

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


Mime
View raw message