public WebResponse getResponse( WebRequest request ) throws IOException { Cookie jsCookie = webClient.getCookieManager().getCookie("JSESSIONID"); if (jsCookie != null && (!jsCookie.getValue().startsWith("\"") && !jsCookie.getValue().endsWith("\""))) { Cookie newCookie = new Cookie(jsCookie.getDomain(), jsCookie.getName(), "\"" + jsCookie.getValue() + "\"", jsCookie.getPath(), jsCookie.getExpires(), jsCookie.isSecure()); webClient.getCookieManager().removeCookie(jsCookie); webClient.getCookieManager().addCookie(newCookie); } return super.getResponse(request); } };
/** * {@inheritDoc} */ @Override public String toString() { return getName() + "=" + getValue() + (getDomain() != null ? ";domain=" + getDomain() : "") + (getPath() != null ? ";path=" + getPath() : "") + (getExpires() != null ? ";expires=" + getExpires() : "") + (isSecure() ? ";secure" : "") + (isHttpOnly() ? ";httpOnly" : ""); }
/** * {@inheritDoc} */ @Override public String toString() { return getName() + "=" + getValue() + (getDomain() != null ? ";domain=" + getDomain() : "") + (getPath() != null ? ";path=" + getPath() : "") + (getExpires() != null ? ";expires=" + getExpires() : "") + (isSecure() ? ";secure" : "") + (isHttpOnly() ? ";httpOnly" : ""); }