问题:HTTP method names must be tokens
2023-12-04T09:43:16.654+08:00 INFO 7808 --- [nio-6600-exec-1] o.apache.coyote.http11.Http11Processor : Error parsing HTTP request header
Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x030x000xc70x010x000x000xc30x030x03em/70xfb0xfdE0x00|<iI0x881X_$0xbf0xe50x82Q0xbf0xc20xed0xbcG0x100x820xcb0x920x00%0x000x00V0xc0$0xc0(0x00=0xc0&0xc0*0x00k0x00j0xc00x0a0xc00x140x0050xc00x050xc00x0f0x0090x0080xc0#0xc0'0x00<0xc0%0xc0)0x00g0x00@0xc00x090xc00x130x00/0xc00x040xc00x0e0x0030x0020xc0,0xc0+0xc000x000x9d0xc0.0xc020x000x9f0x000xa30xc0/0x000x9c0xc0-0xc010x000x9e0x000xa20x000xff0x010x000x00D0x000x0a0x000x160x000x140x000x170x000x180x000x190x000x090x000x0a0x000x0b0x000x0c0x000x0d0x000x0e0x000x160x000x0b0x000x020x010x000x000x0d0x000x1c0x000x1a0x060x030x060x010x050x030x050x010x040x030x040x010x040x020x030x030x030x010x030x020x020x030x020x010x020x020x000x170x000x00...]. HTTP method names must be tokens
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:407) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:264) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1740) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.11.jar:10.1.11]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
分析原因:
http的接口请求使用了https的协议
解决方案:
调用时使用http进行