Issue : CookieEncoder quoted String
ekefly
jinjian.1 at gmail.com
Thu Oct 20 22:34:52 EDT 2011
Hi,
Thanks. It does make sense. And i think i need change encoder/decoder a
little bit when we used it in a Proxy to keep all cookie string as-is.
Best Regards!
Jian Jin
2011/10/21 Trustin Lee [via Netty Forums and Mailing Lists] <
ml-node+s685743n6915222h35 at n2.nabble.com>
> In RFC 2965:
>
> value = token | quoted-string
>
> and token is, informally, a sequence of non-special, non-white space
> characters.
>
> In Section 2.2 of RFC 2616:
>
> token = 1*<any CHAR except CTLs or separators>
> separators = "(" | ")" | "<" | ">" | "@"
> | "," | ";" | ":" | "\" | <">
> | "/" | "[" | "]" | "?" | "="
> | "{" | "}" | SP | HT
>
>
> So, if value contains any of the separator characters, it should be quoted.
>
>
>
>
>
> --
> Trustin Lee
> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
>
> On Wednesday, October 19, 2011 at 1:05 AM, ekefly wrote:
>
> 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.
> _______________________________________________
> netty-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=6915222&i=0>
> https://lists.jboss.org/mailman/listinfo/netty-users
>
>
>
> _______________________________________________
> netty-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=6915222&i=1>
> https://lists.jboss.org/mailman/listinfo/netty-users
> what we call human nature in actuality is human habit
> http://gleamynode.net/
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Issue-CookieEncoder-quoted-String-tp6907623p6915222.html
> To unsubscribe from Issue : CookieEncoder quoted String, click here<http://netty-forums-and-mailing-lists.685743.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6907623&code=amluamlhbi4xQGdtYWlsLmNvbXw2OTA3NjIzfDEzMDY0MTc5MDE=>.
>
>
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Issue-CookieEncoder-quoted-String-tp6907623p6915560.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list