首页 > 编程语言 > 详细

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

时间:2019-04-28 12:15:04      阅读:3078      评论:0      收藏:0      [点我收藏+]

标签: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

标签:org   pre   应用   设置   http1   sdn   pool   tor   声明   

原文:https://www.cnblogs.com/chancy/p/10782289.html

(0)
(0)
   
举报
评论 一句话评论(0
© 2014 bubuko.com 版权所有 鲁ICP备09046678号-4
打开技术之扣,分享程序人生!
             

鲁公网安备 37021202000002号