com.atlassian.bamboo.build
Class CookieCutterImpl
java.lang.Object
com.atlassian.bamboo.build.CookieCutterImpl
- All Implemented Interfaces:
- CookieCutter
- Direct Known Subclasses:
- FilterController
public class CookieCutterImpl
- extends Object
- implements CookieCutter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILTER_COOKIE_AGE
public static int FILTER_COOKIE_AGE
AJS_CONGLOMERATE_COOKIE
public static final String AJS_CONGLOMERATE_COOKIE
- See Also:
- Constant Field Values
CookieCutterImpl
public CookieCutterImpl()
saveValueInCookie
public void saveValueInCookie(String key,
String value)
- Specified by:
saveValueInCookie
in interface CookieCutter
getValueFromCookie
@NotNull
public String getValueFromCookie(String key)
- Specified by:
getValueFromCookie
in interface CookieCutter
getValueFromCookie
public String getValueFromCookie(String key,
String defaultValue)
- Specified by:
getValueFromCookie
in interface CookieCutter
fixCookies
public static boolean fixCookies()
- It seems that AJS conglomerate cookie can sometimes start with a quote character without being appropriately terminated
with another quote character. This causes random cookies to disappear (at least in Jetty, all cookies after and including
AJS.conglomerate will be dropped). This may include JSESSIONID, preventing a user from logging in by reissuing a new JSESSIONID
with each request.
The workaround is to detect that cookie and remove it.
- Returns:
getValueFromConglomerateCookie
public String getValueFromConglomerateCookie(String cookieKey,
String key)
- Retrieve variable from AJS conglomerate cookie.
AJS saves its cookie variables in single cookie as key=value, '|' char is the separator.
- Specified by:
getValueFromConglomerateCookie
in interface CookieCutter
- Parameters:
cookieKey
- key of the cookiekey
- key of a variable
- Returns:
- value or null if not found
Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.