users@jersey.java.net

Re: [Jersey] Checking service call for Accept-Language header

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 31 Aug 2009 18:15:40 +0200

On Aug 31, 2009, at 4:44 PM, DirkM wrote:

>
> It seems that if no Accept-Language header is supplied,
> ContainerRequest.getAcceptableLanguages() will return a single
> Locale with
> the language set to "*" (as opposed to an empty list). It might be
> worth
> adding something to the javadoc just to be clear.
>

OK.

Note that i am assuming that if an Accept-Language header is not
present then it is equivalent to one with "*", which is the case
algorithmically when performing matching.


> To check the raw value of the Accept-Language header, call
> request.getHeaderValue(HttpHeaders.ACCEPT_LANGUAGE);
>

Yes.


> I also noticed that there's a typo in the name of
> http://fisheye4.atlassian.com/browse/jersey/trunk/jersey/jersey-server/src/main/java/com/sun/jersey/server/impl/model/HttpHelper.java?r=2676#l191
> HttpHelper.getAcceptLangauge and that the methods in the class
> don't use
> the constants defined in javax.ws.rs.core.HttpHeaders.

Could you log an one issue for this + docs?

Thanks,
Paul.

> --
> View this message in context: http://n2.nabble.com/Checking-service-call-for-Accept-Language-header-tp3537044p3553881.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>