错误信息
信息: Error parsing HTTP request headerNote: 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 tokensat org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:136)at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1028)at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)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)
解决办法:
情况1:这里说一下我遇到的情况,在做小程序开发的时候,因为线上版本用的是https,我改成本地的时候忘记改成http,然后就报了这个错误,将请求地址https改成http就好了。
其余情况待遇到补充,如果你遇到相同错误,情况不同,请留言告知