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);
    }
}


-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/859d115e-920d-43e9-a6ee-ac1c2dbb81e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to