0
点赞
收藏
分享

微信扫一扫

解析HTTP请求header错误

运行tomcat时,本以为成功了,结果,突然出现这两个错误  org.apache.coyote.http11.Http11Processor.service 解析 HTTP 请求 header 错误注意:HTTP请求解析错误的进一步发生将记录在DEBUG级别。     java.lang.IllegalArgumentException: 在方法名称中发现无效的字符串, HTTP 方法名必须是有效的符号。

解析HTTP请求header错误_tomcat报HTTP请求head错误


解决方法:进入tomcat --> conf--> server.xml,找到此文件,用记事本打开。找到以下代码,大概在69行

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="8000"
               redirectPort="8443"
               maxParameterCount="1000"
               URIEncoding="utf-8"
               server="Mic"
               />

    <!-- A "Connector" using the shared thread pool-->

修改为:

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="8000"
               redirectPort="8443"
               maxParameterCount="1000"
               URIEncoding="utf-8"
               server="Mic"
               relaxedPathChars="|{}[],%"
			   relaxedQueryChars="|{}[],%"/>
               />

    <!-- A "Connector" using the shared thread pool-->

举报

相关推荐

0 条评论