本人微信公众号"aeolian"~

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

一月 19, 2019 11:37:32 上午 org.apache.coyote.http11.AbstractHttp11Processor process
信息: 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.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:140)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1050)
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)

将SSLEngine=”on”改为off后,重启。

网上其他参考方案

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

  useBodyEncodingForURI=”false”
enableLookups=”false”
               connectionTimeout=”20000″

               redirectPort=”8443″ maxHttpHeaderSize=”你想要的大小”/>

2.可能是因为请求协议不对,需要统一成https或http请求。

点赞

Leave a Reply

Your email address will not be published. Required fields are marked *