Any suggestion here ?

On 2/7/2011 10:58 PM, Reinwald Warapen wrote:
Hey,
I am using Tomcat 6.0.32 and im facing a problem when reading cookies having a colon in the value.

// start snippet
        Cookie test=new Cookie("TESTING","http://test:8081";);
        response.addCookie(test);
//end snippet

Now during the next request when I try reading the cookie value I get the value as "http". When URL encoding it I get the required output.

But reading up the docs say that this should be handled by the container when |org.apache.catalina.STRICT_SERVLET_COMPLIANCE is set to false."|If set to |false|, any v0 cookie with invalid character will be switched to a v1 cookie and the value will be quoted." I tired setting this but it still fails. Also explicitly setting the version to 1 still gives me the value as just "http".Some articles do mention that the RFC spec indicates that the value can be anything and a colon is legal.

Am I missing something here or is Urlencoding the only way to go about this ?







---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to