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

 

阿里云上弄了一个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"/>

时间: 2024-12-22 00:18:35

解决: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 RFC 问题

通过这里的回答,我们可以知道: Tomcat在 7.0.73, 8.0.39, 8.5.7 版本后,添加了对于http头的验证. 具体来说,就是添加了些规则去限制HTTP头的规范性 参考这里 具体来说: org.apache.tomcat.util.http.parser.HttpParser#IS_NOT_REQUEST_TARGET[]中定义了一堆not request target if(IS_CONTROL[i] || i > 127 || i == 32 || i == 34 || i

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

通过这里的回答,我们可以知道: Tomcat在 7.0.73, 8.0.39, 8.5.7 版本后,添加了对于http头的验证. 具体来说,就是添加了些规则去限制HTTP头的规范性 参考这里 具体来说: org.apache.tomcat.util.http.parser.HttpParser#IS_NOT_REQUEST_TARGET[]中定义了一堆not request target if(IS_CONTROL[i] || i > 127 || i == 32 || i == 34 || i

异常解决:Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

前言: 在用IE浏览器时访问tomcat项目时,页面报400错误,后台错误: java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 在网上查得资料时因为Tomcat版本在7以后会对http请求进行验证 解决办法: 1.使用encodeURI函数,因为IE浏览器无法对URL

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

  o.apache.coyote.http11.Http11Processor : 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 metho

Asp.Net 使用System.Data.OracleClient 连接oralce中文乱码以及sql含中文别名出现ORA-00911:Invalid character解决办法

不需要去修改oracle以及client的字符集,只需要在web.config中连接字符串上加上 Unicode=True 问题解决. <add key="connstring" value="Data Source=orcl;user id=username;password=password;Unicode=True"/> <add name="ConnectionString" connectionString="

【bug】Syntax error on token &quot;Invalid Character&quot;, delete this token 的解决

原文地址:https://blog.csdn.net/actsai/article/details/24256987   eclipse 中遇到了Syntax error on token "Invalid Character", delete this token的错误提示,看代码是完全没有问题,上网查了半天发现遇到这个问题的好像不太多,总结一下问题原因和解决方案吧. 看到这个提示首先想到的是标点符号不是不是中文,或者全角半角的问题了,通过检查,这种问题并不存在. 然后看到一个帖子说

Eclipse 中 Syntax error on token &quot;Invalid Character&quot;, delete this token 的解决

eclipse中遇到了Syntax error on token "Invalid Character", delete this token(令牌"无效字符"上的语法错误,删除此令牌)的错误提示,看代码是完全没有问题,上网查了半天发现遇到这个问题的好像不太多,总结一下问题原因和解决方案: 1.看到这个提示首先想到的是标点符号是不是中文,或者全角半角的问题了,通过检查,这种问题并不存在. 2.然后看到一个帖子说用Android Studio引入eclipse项目时遇

An invalid character [32] was present in the Cookie value

HTTP Status 500 – Internal Server Error Type Exception Report Message An invalid character [32] was present in the Cookie value Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception java.l

Golden32 别名时中文 报ORA-00911: invalid character错误

查询数据库软件我一般用两个:PL SQL和golden32:使用golden32-之前使用的时候别名为中文是没有任何问题:直到我想将PL SQL汉化(使用中文包chinese.exe),汉化完后再次查询语句就变成报错“ORA-00911: invalid character”:之后搜索了很多网页来解决这个问题,但是大多数是指标点符号的问题: 后来在这个网址找到问题的解决方案:http://blog.csdn.net/iloli/article/details/7766563: 通过添加系统变量来

iOS利用Application Loader打包提交到App Store时遇到错误The filename 未命名.ipa in the package contains an invalid character(s). The valid characters are:A-Z ,a-z,0-9,dash,period,underscore,but the name cannot start w

iOS利用Application Loader打包提交到App Store时遇到错误: The filename 未命名.ipa in the package contains an invalid character(s). The valid characters are:A-Z,a-z,0-9,dash,period,underscore,but the name cannot start with a dash,period,or underscore. 解决方法:在Archive之后得