异常:Invalid character found in method name. HTTP method names must be tokens

1.异常截图:

59$Q6B67{IS}XWW3`@CFB}N

2.异常内容

java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:422)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:683)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

3.解决方案

    Tomcat的header缓冲区大小不够,只需要在server.xml中增加maxHttpHeaderSize字段即可

    

    异常:Invalid character found in method name. HTTP method names must be tokens_第1张图片

参考地址:https://www.cnblogs.com/softidea/p/6917086.html

你可能感兴趣的:(异常集锦)