Issue : CookieEncoder quoted String

ekefly jinjian.1 at gmail.com
Wed Oct 19 04:05:33 EDT 2011


I looked into cookieencoder's src code:


/private static void add(StringBuilder sb, String name, String val) {
        if (val == null) {
            addQuoted(sb, name, "");
            return;
        }

        for (int i = 0; i < val.length(); i ++) {
            char c = val.charAt(i);
            switch (c) {
            case '\t': case ' ': case '"': case '(':  case ')': case ',':
            case '/':  case ':': case ';': case '<':  case '=': case '>':
            case '?':  case '@': case '[': case '\\': case ']':
            case '{':  case '}':
                addQuoted(sb, name, val);
                return;
            }
        }

        addUnquoted(sb, name, val);
    }/

Could anybody know which specification need encoder do this?  I checked rfc
2109 and 2965, do not find any part describe this. Or i may ignore
something. 

--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Issue-CookieEncoder-quoted-String-tp6907623p6907651.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list