zoukankan      html  css  js  c++  java
  • 解决Tomcat的IllegalArgumentException: Control character in cookie value or attribute错误

    接口中带有中文,tomcat8

    17-Apr-2019 13:21:23.734 严重 [http-nio-8082-exec-2] 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:729)
    	at org.apache.tomcat.util.http.LegacyCookieProcessor.processCookieHeader(LegacyCookieProcessor.java:526)
    	at org.apache.tomcat.util.http.LegacyCookieProcessor.parseCookieHeader(LegacyCookieProcessor.java:256)
    	at org.apache.catalina.connector.Request.parseCookies(Request.java:3059)
    	at org.apache.catalina.connector.Request.getServerCookies(Request.java:2075)
    	at org.apache.catalina.connector.CoyoteAdapter.parseSessionCookiesId(CoyoteAdapter.java:1211)
    	at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:918)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:497)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    	at java.lang.Thread.run(Thread.java:745)
    

      

    解决方法:

     在tomcat下的conf/context.xml 

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

      

  • 相关阅读:
    PyQt5复杂控件(树控件、选项卡控件(滚动条控件、多文档控件、停靠控件)
    PyQt5单元格操作大全
    PyQt5打印机
    PyQt5剪切板操作
    PyQt5的菜单栏、工具栏和状态栏
    PyQt5日历控件及相关操作
    PyQt5控件支持拖拽方法
    《Lua程序设计》第3章 表达式 学习笔记
    Lua中的table构造式(table constructor)
    《Lua程序设计》第2章 类型与值 学习笔记
  • 原文地址:https://www.cnblogs.com/linlf03/p/10723008.html
Copyright © 2011-2022 走看看