> -----Original Message----- > From: Sergey Beryozkin [mailto:[email protected]] > Sent: Friday, January 15, 2010 3:38 AM > To: [email protected] > Subject: Re: If "accept-language: es" is in request headers, should > Locale be fully set? > > 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
Got it. I was confused. > ----- 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).
