SpringBoot:Invalid character found in method name. HTTP method names must be tokens
阿新 • • 發佈:2019-04-28
org pre 應用 設置 http1 sdn pool tor 聲明
問題背景
關於SpringBoot應用掛了很久之後,會發生Invalid character found in method name. HTTP method names must be tokens
的問題。
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:426) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:687) ~[tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) [tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) [tomcat-embed-core-8.5.29.jar:8.5.29] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.29.jar:8.5.29] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135) [na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [na:na] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.29.jar:8.5.29] at java.base/java.lang.Thread.run(Thread.java:844) [na:na]
網上方案 據說是tomcat 的設置問題,如果出現相關情況,可以設置一下application.yml。還有的說是https問題。
server: tomcat: uri-encoding: UTF-8 max-http-header-size: 8096
server: port: 5555 servlet: context-path: /xxxx tomcat: remote-ip-header: x-forward-for uri-encoding: UTF-8 max-threads: 1000 max-http-header-size: 8096--------------------- 作者:Moshow鄭鍇 來源:CSDN 原文:https://blog.csdn.net/moshowgame/article/details/82597326 版權聲明:本文為博主原創文章,轉載請附上博文鏈接!
SpringBoot:Invalid character found in method name. HTTP method names must be tokens