String name = cookie.getName();
final String headername = "Set-Cookie";
final String startsWith = name + "=";
final String cookieString = getCookieString(cookie);
boolean set = false;
MimeHeaders headers = coyoteResponse.getResponse().getHeaders();
int n = headers.size();
for (int i = 0; i < n; i++) {
if (headers.getName(i).toString().equals(headername)) {
if (headers.getValue(i).toString().startsWith(startsWith)) {
headers.getValue(i).setString(cookieString);
set = true;
}
}
}
if (!set) {