Tomcat8:IllegalArgumentException: 为此cookie指定的域[.xxx.com]无效

Dcr 1年前 ⋅ 1431 阅读

背景

升级至tomcat8,启动后访问报java.lang.IllegalArgumentException: 为此cookie指定的域[.xxx.com]无效

问题原因

tomcat-8.5.61更换默认的CookieProcessor实现为Rfc6265CookieProcessor,之前的实现为LegacyCookieProcessor。Rfc6265CookieProcessor 基于RFC6265,而LegacyCookieProcessor基于RFC6265、RFC2109、RFC2616。

解决方案

修改apache-tomcat-8.5.61>conf>context.xml

 <!--增加一行-->
	<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />

全部评论: 0

    我有话说: