diff src/main/java/de/intevation/artifacts/httpclient/http/HttpClientImpl.java @ 11:ea8b7e244e61

Bugfix: repaired a condition that prevented setting the locale of the request object. http-client/trunk@1680 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 14 Apr 2011 07:51:51 +0000
parents e79283dad6f2
children 5b62267a1c3c
line wrap: on
line diff
--- a/src/main/java/de/intevation/artifacts/httpclient/http/HttpClientImpl.java	Thu Apr 14 06:01:00 2011 +0000
+++ b/src/main/java/de/intevation/artifacts/httpclient/http/HttpClientImpl.java	Thu Apr 14 07:51:51 2011 +0000
@@ -299,7 +299,7 @@
      * @param info The ClientInfo that is used to provide request information.
      */
     private void setLocale(ClientInfo info) {
-        if (localeString != null) {
+        if (localeString == null) {
             return;
         }
 
@@ -309,6 +309,8 @@
         Language lang = Language.valueOf(localeString);
 
         if (lang != null) {
+            logger.info("Set locale of the request object: " + lang.toString());
+
             Preference<Language> pref = new Preference<Language>();
             pref.setMetadata(lang);
             accepted.add(pref);

http://dive4elements.wald.intevation.org