java中that contained an invalid cookie解决方法相关说明??

参考:https://blog.csdn.net/weixin_45578033/article/details/105407266

tongweb容器启动现象:

A cookie header was received[xxxxxx] that contained an invalid cookie. That cookie will be ignore.

解决方法(tomcat为例):

1.在context.xml中配置

旧版中,修改${catalina.home}/conf/server.xml如下

<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor"/></Context>

Tomcat8/9修改context.xml如下

   <CookieProcessor className ="org.apache.tomcat.util.http.LegacyCookieProcessor"/></Context>


2.在启动项中配置

@Bean

public WebServerFactoryCustomizer cookieProcessorCustomizer() {undefined

return (factory) -> factory.addContextCustomizers(

(context) -> context.setCookieProcessor(new LegacyCookieProcessor()));

}

??

??

评论

© java小牛钱小白 | Powered by LOFTER