How are Tomcat cookies with quoted values ​​correctly read in ASP?

We have a website that integrates Java web applications under Tomcat with ASP pages, including the sharing of cookies in the traditional ASP / value format:

Cookie: foo=a=b&c=d; ...

As in Tomcat 5.5.26, the handling of cookies has been slightly changed, and now the cookie value is now enclosed in quotation marks, which was not the case before:

Cookie: foo="a=b&c=d"; ...

However, we have an ASP code that also reads this cookie and that expects the values ​​in it to be processed this way:

Response.Write("["+Request.Cookies("foo")("c")+"]");

Now this does not return the expected result:

[d"]

I read about using:

javax.servlet.http.Cookie#setVersion(int)

, , . , "", ASP, ... - , , ASP ( Tomcat) ? TIA, .

+3
1

cookie cookie > 1 2 cookie cookie 0

tomcats bugzilla: https://issues.apache.org/bugzilla/show_bug.cgi?id=44679, , tomcats cookie .

cookie tomcat, cookie:

Cookie cookie = new Cookie(COOKIENAME,COOKIEVALUE);
cookie.setVersion(0);

cookie , char -set , / .

+2

All Articles