Hello Alexander Wels,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/17561

to review the following change.

Change subject: userportal,webadmin: unite locale cookie
......................................................................

userportal,webadmin: unite locale cookie

- Set the locale cookie path to '/' so we can share the
cookie between all the applications.

Change-Id: Id20dda2985226a9a525e9c0f0b2d8c20cb0a6210
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988008
Signed-off-by: Alexander Wels <aw...@redhat.com>
---
M 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/LocaleFilter.java
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/61/17561/1

diff --git 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/LocaleFilter.java
 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/LocaleFilter.java
index 07b62b4..9fda8a8 100644
--- 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/LocaleFilter.java
+++ 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/LocaleFilter.java
@@ -42,6 +42,11 @@
     public static final String LOCALE = "locale";
 
     /**
+     * The root of a path.
+     */
+    public static final String ROOT_PATH = "/";
+
+    /**
      * The default locale.
      */
     public static final Locale DEFAULT_LOCALE = Locale.US;
@@ -70,7 +75,7 @@
             final Locale userLocale) {
         // Detected locale doesn't match the default locale, set a cookie.
         Cookie cookie = new Cookie(LocaleFilter.LOCALE, userLocale.toString());
-        cookie.setPath(servletContext.getContextPath());
+        cookie.setPath(ROOT_PATH);
         cookie.setMaxAge(Integer.MAX_VALUE); // Doesn't expire.
         response.addCookie(cookie);
     }


-- 
To view, visit http://gerrit.ovirt.org/17561
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id20dda2985226a9a525e9c0f0b2d8c20cb0a6210
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to