buffer1.append(HTTPConstants.HEADER_SET_COOKIE);
buffer1.append(": ");
buffer1.append(Constants.SESSION_COOKIE_JSESSIONID);
buffer1.append("=");
buffer1.append(sessionCookie);
response.addHeader(new BufferedHeader(buffer1));
// Generate RFC2965 cookie2 header
CharArrayBuffer buffer2 = new CharArrayBuffer(sessionCookie.length() + 50);
buffer2.append(HTTPConstants.HEADER_SET_COOKIE2);
buffer2.append(": ");
buffer2.append(Constants.SESSION_COOKIE_JSESSIONID);
buffer2.append("=");
buffer2.append(sessionCookie);
buffer2.append("; ");
int port = response.getParams().getIntParameter(AxisParams.LISTENER_PORT, 0);
if (port > 0) {
buffer2.append("Port=\"");
buffer2.append(Integer.toString(port));
buffer2.append("\"; ");
}
buffer2.append("Version=1");
response.addHeader(new BufferedHeader(buffer2));
}
}