if (count <= 0) {
return;
}
for (int i = 0; i < count; i++) {
ServerCookie scookie = serverCookies.getCookie(i);
if (scookie.getName().equals(Globals.SESSION_COOKIE_NAME)) {
// Override anything requested in the URL
if (!isRequestedSessionIdFromCookie()) {
// Accept only the first session id cookie
B2CConverter.convertASCII(scookie.getValue());
setRequestedSessionId
(scookie.getValue().toString());
// TODO: Pass cookie path into
// getSessionVersionFromCookie()
String sessionVersionString = getSessionVersionFromCookie();
parseSessionVersionString(sessionVersionString);
setRequestedSessionCookie(true);
// TBD: ServerCookie#getSecure currently always returns
// false.
setRequestedSessionIdFromSecureCookie(scookie.getSecure());
setRequestedSessionURL(false);
if (log.isDebugEnabled()) {
log.debug("Requested cookie session id is " +
((HttpServletRequest) getRequest())
.getRequestedSessionId());
}
} else {
if (!isRequestedSessionIdValid()) {
// Replace the session id until one is valid
B2CConverter.convertASCII(scookie.getValue());
setRequestedSessionId
(scookie.getValue().toString());
// TODO: Pass cookie path into
// getSessionVersionFromCookie()
String sessionVersionString =
getSessionVersionFromCookie();
parseSessionVersionString(sessionVersionString);