V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sodadev
V2EX  ›  Java

[Tomcat]报错,跪求 tomcat 大佬进来指点!

  •  
  •   sodadev · 2019-09-24 11:30:32 +08:00 · 4078 次点击
    这是一个创建于 1923 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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 报错,我查了一天也没找到合适的答案,跪求大佬们指导一下处理思路!多谢了!

    4 条回复    2019-10-28 16:42:54 +08:00
    bifwig
        1
    bifwig  
       2019-09-24 11:36:26 +08:00
    360 浏览器访问的?
    Giny
        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");
    uleh
        3
    uleh  
       2019-09-24 11:51:05 +08:00
    `Control character in cookie value or attribute.`

    清一下浏览器 cookie 然后重新访问
    sodadev
        4
    sodadev  
    OP
       2019-10-28 16:42:54 +08:00
    @bifwig 是 ie 浏览器 或者 360 浏览器
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2776 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 14:51 · PVG 22:51 · LAX 06:51 · JFK 09:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.