if (context != null && !context.getCookies()) {
return;
}
// Parse session id from cookies
Cookies serverCookies = coyoteRequest.getCookies();
int count = serverCookies.getCookieCount();
if (count <= 0) {
return;
}
String sessionCookieName = Globals.SESSION_COOKIE_NAME;
if (context != null) {
sessionCookieName = context.getSessionCookieName();
}
for (int i = 0; i < count; i++) {
ServerCookie scookie = serverCookies.getCookie(i);
if (scookie.getName().equals(sessionCookieName)) {
// Override anything requested in the URL
if (!isRequestedSessionIdFromCookie()) {
// Accept only the first session id cookie
B2CConverter.convertASCII(scookie.getValue());