Hello,
I see the code difference between 4.1.1 and 4.0.19 while encoding cookie due to which we are facing problems. When I encode the cookie [UNIQEID=758B59989313E60ECA0FDF8BD7BECD87, path=/, secure, HTTPOnly] using ClientCookieEncoder then it is converting into [JSESSIONID=758B59989313E60ECA0FDF8BD7BECD87] where path is missing. This is happening with 4.1.1 and not with 4.0.19.
Code in 4.0.19 - where name, value, path, domain, version every thing is handled properly.
private static void encode(StringBuilder buf, Cookie c) {
if (c.getVersion() >= 1) {
add(buf, '$' + CookieHeaderNames.VERSION, 1);
}
add(buf, c.getName(), c.getValue());
if (c.getPath() != null) {
add(buf, '$' + CookieHeaderNames.PATH, c.getPath());
}
if (c.getDomain() != null) {
add(buf, '$' + CookieHeaderNames.DOMAIN, c.getDomain());
}
if (c.getVersion() >= 1) {
.........
}
}
}
Code in 4.1.1 - where path, domain, version are missing due to this I am facing problems
private void encode(StringBuilder buf, Cookie c) {
final String name = c.name();
final String value = c.value() != null ? c.value() : "";
validateCookie(name, value);
if (c.wrap()) {
addQuoted(buf, name, value);
} else {
add(buf, name, value);
}
}