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

Posted 听雨轩

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决:Invalid character found in method name. HTTP method names must be tokens相关的知识,希望对你有一定的参考价值。

 

59$Q6B67{IS}XWW3`@CFB}N

阿里云上弄了一个tomcat,经常半夜发送崩溃,查看日志发现这个东西,查阅资料发现是Tomcat的header缓冲区大小不够,只需要在server.xml中增加maxHttpHeaderSize字段即可:

<Connector URIEncoding="UTF-8" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
	useBodyEncodingForURI="false"
	enableLookups="false"
               connectionTimeout="20000"
               redirectPort="8443" maxHttpHeaderSize="你想要的大小"/>
如:

   <Connector port="8080" executor="tomcatThreadPool"
     protocol="HTTP/1.1"
     maxThreads="1000"
     maxHttpHeaderSize="8192"
     minSpareThreads="100"
     maxSpareThreads="200"
     acceptCount="1000"
     maxConnections="1000"
     connectionTimeout="30000"
     keepAliveTimeout="15000"
     maxKeepAliveRequests="1"
      tcpNoDelay="true"
     redirectPort="8443"
     enableLookups="false"
     URIEncoding="UTF-8"/>

以上是关于解决:Invalid character found in method name. HTTP method names must be tokens的主要内容,如果未能解决你的问题,请参考以下文章

编写python代码时出现SyntaxError: invalid character in identifier的解决方法

安装JDK时提示 IllegalArgumentException:Invalid characters in hostname的解决方法

解决 Invalid character found in method name. HTTP method names must be tokens 异常信息

解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RF

解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RF

ruby环境sass编译中文出现Syntax error: Invalid GBK character错误解决方法