Hi David
Perhaps you're looking at the older JavaDocs ? I'm seeing that 'null' should be
returned...
By the way, it says "the language of the request entity", thus the implementation checks
for a "Content-Language" header
cheers, Sergey
[1]
https://jsr311.dev.java.net/nonav/releases/1.0/javax/ws/rs/core/HttpHeaders.html#getLanguage()
[2]
https://jsr311.dev.java.net/nonav/releases/1.1/javax/ws/rs/core/HttpHeaders.html#getLanguage()
----- Original Message -----
From: "KARR, DAVID (ATTCINW)" <[email protected]>
To: <[email protected]>
Sent: Thursday, January 14, 2010 10:18 PM
Subject: If "accept-language: es" is in request headers, should Locale be fully
set?
I don't know if this is a problem with CXF or something else.
I'm testing code that handles the "accept-language" request header being
present. I'm testing it with a value of "es". The headers are injected
into my HttpHeaders instance. When I call "getAcceptableLanguages()" it
returns a list with one entry, which when toStringed gets "es". I then
call "getLanguage()" and instead of returning "es", it returns null.
Besides the fact that it doesn't return "es", I also note that the
javadoc says that it should either return "the empty string" or the
locale's language code (not null as I found).