users@jersey.java.net

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

From: DirkM <dirk_at_olx.com>
Date: Mon, 31 Aug 2009 09:44:41 -0500 (CDT)

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.

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

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