24-Sep-2019 11:25:32.062 SEVERE [http-nio-8080-exec-35] org.apache.coyote.http11.AbstractHttp11Processor.process Error processing request java.lang.IllegalArgumentException: Control character in cookie value or attribute. at org.apache.tomcat.util.http.LegacyCookieProcessor.isV0Separator(LegacyCookieProcessor.java:748) at org.apache.tomcat.util.http.LegacyCookieProcessor.processCookieHeader(LegacyCookieProcessor.java:545) at org.apache.tomcat.util.http.LegacyCookieProcessor.parseCookieHeader(LegacyCookieProcessor.java:273) at org.apache.catalina.connector.Request.parseCookies(Request.java:2949) at org.apache.catalina.connector.Request.getServerCookies(Request.java:2004) at org.apache.catalina.connector.CoyoteAdapter.parseSessionCookiesId(CoyoteAdapter.java:1205) at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:916) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:513) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)
突然接到运维任务,这是某 zf 的办公平台的 tomcat 报错,我查了一天也没找到合适的答案,跪求大佬们指导一下处理思路!多谢了!
1
bifwig 2019-09-24 11:36:26 +08:00
360 浏览器访问的?
|
2
Giny 2019-09-24 11:42:42 +08:00
说的的是 cookie 中的值 编码有问题 ,能不能 统一为 cookie 设置 utf-8 的编码 类似这样
设置 cookie Cookie cookie = new Cookie(name, URLEncoder.encode(value, "UTF-8")); 读取 cookie String value = URLDecoder.decode(cookie.getValue(), "UTF-8"); |
3
uleh 2019-09-24 11:51:05 +08:00
`Control character in cookie value or attribute.`
清一下浏览器 cookie 然后重新访问 |