{
// Perform one request to server1 to create a session
Request request = client.newRequest("http://localhost:" + port1 + contextPath + servletMapping + "?action=set");
request.method(HttpMethod.GET);
ContentResponse response = request.send();
assertEquals( HttpServletResponse.SC_OK, response.getStatus());
String sessionCookie = response.getHeaders().get("Set-Cookie");
assertTrue(sessionCookie != null);
// Mangle the cookie, replacing Path with $Path, etc.
sessionCookie = sessionCookie.replaceFirst("(\\W)(P|p)ath=", "$1\\$Path=");