1、错误描述
- 信息: Error parsing HTTP request header
- Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
- java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
- at org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:233)
- at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1045)
- at org.apache.coyote.AbstractProtocolAbstractConnectionHandler.process(AbstractProtocol.java:684) </span></li><li class="alt"><span> at org.apache.tomcat.util.net.NioEndpoint AbstractConnectionHandler.process(AbstractProtocol.java:684) </span></li><li class="alt"><span> at org.apache.tomcat.util.net.NioEndpoint SocketProcessor.doRun(NioEndpoint.java:1533)
- at org.apache.tomcat.util.net.NioEndpointSocketProcessor.run(NioEndpoint.java:1489) </span></li><li class="alt"><span> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) </span></li><li class=""><span> at java.util.concurrent.ThreadPoolExecutor SocketProcessor.run(NioEndpoint.java:1489) </span></li><li class="alt"><span> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) </span></li><li class=""><span> 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)
信息: Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
at org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:233)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1045)
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: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)
2、错误原因
由错误提示可知,是因为方法名内有不合法的字符
3、解决办法
(1)检查方法名称,去掉不合法的字符
</article>