<div>In RFC 2965:<div><br></div><div>value = token | quoted-string</div><div><br></div><div>and token is, informally, <span class="Apple-style-span" style="font-family: monospace; white-space: pre-wrap; ">a sequence of non-special, non-white space characters.</span></div><div><span class="Apple-style-span" style="font-family: monospace; white-space: pre-wrap; "><br></span></div><div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space: pre-wrap;">In Section 2.2 of RFC 2616:</span></font></div><div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space: pre-wrap;"><br></span></font></div><div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space: pre-wrap;"><pre> token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT</pre><pre><br></pre><pre>So, if value contains any of the separator characters, it should be quoted.</pre><pre><br></pre><pre><br></pre></span></font></div><div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space: pre-wrap; "><br></span></font></div></div>
<div><br>-- <br>Trustin Lee<br>Sent with <a href="http://www.sparrowmailapp.com/?sig">Sparrow</a><br></div>
<p style="color: #A0A0A8;">On Wednesday, October 19, 2011 at 1:05 AM, ekefly wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div>I looked into cookieencoder's src code:<br><br><br>/private static void add(StringBuilder sb, String name, String val) {<br> if (val == null) {<br> addQuoted(sb, name, "");<br> return;<br> }<br><br> for (int i = 0; i < val.length(); i ++) {<br> char c = val.charAt(i);<br> switch (c) {<br> case '\t': case ' ': case '"': case '(': case ')': case ',':<br> case '/': case ':': case ';': case '<': case '=': case '>':<br> case '?': case '@': case '[': case '\\': case ']':<br> case '{': case '}':<br> addQuoted(sb, name, val);<br> return;<br> }<br> }<br><br> addUnquoted(sb, name, val);<br> }/<br><br>Could anybody know which specification need encoder do this? I checked rfc<br>2109 and 2965, do not find any part describe this. Or i may ignore<br>something. <br><br>--<br>View this message in context: <a href="http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Issue-CookieEncoder-quoted-String-tp6907623p6907651.html">http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Issue-CookieEncoder-quoted-String-tp6907623p6907651.html</a><br>Sent from the Netty User Group mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>netty-users mailing list<br><a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br></div></div></span>
</blockquote>
<div>
<br>
</div>