The valid characters are defined in RFC 7230 and RFC 3986报错处理

解决办法:

1、更换低版本Tomcat,如Tomcat7.0.69之前的版本

2、如果是Linux环境,修改部署Tomcat目录conf里的catalina.properties文件

tomcat.util.http.parser.HttpParser.requestTargetAllow=|[]{}

3、如果是window环境,存在上面修改无效的情况,此时修改Tomcat/conf里的server.xml

<Connector connectionTimeout="20000" port="8090" protocol="HTTP/1.1" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;" redirectPort="8443"/>

增加配置:

relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
posted @ 2020-05-06 13:13  x_jingxin  阅读(240)  评论(0编辑  收藏  举报