一、问题html
若是用 tomcat 8.5.x 写的带有特殊符号(=)的cookie,而后跳转到其余部署在tomcat8.0.x 应用,而后获取cookie会发现 tomcat8.0.x 会过滤掉=apache
二、怎么解决tomcat
方案一:把 = 符号去掉cookie
方案二: 能够把低版本tomcat( tomcat8.0.x或者tomcat7.0.x)的catalina.properties加上以下配置。 这样就能够解决等号问题了.net
org.apache.tomcat.util.http.ServerCookie.ALLOW_EQUALS_IN_VALUE=true
参考:http://blog.csdn.net/gotobar/article/details/51902348code
官方文档地址:http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html
htm
通过观察发现 tomcat8.0.x 带双引号, 8.5.x的cookie 不带双引号blog
//tomcat 8.0.x Cookie: SESSION="Ecwo4mTii4q/ihlyZxXW==";
//tomcat 8.5.x Cookie: SESSION=L0vmBBFvlGIPm6RdKrJP==;
三、总结图片
只要是用tomcat 8.5.x写的cookie ,在tomcat7.0.x 或 tomcat8.0.x 获取会有问题,反过来是没有问题文档