The valid characters are defined in RFC 7230 and RFC 3986

问题描述

INFO: 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 the request target. The valid characters are defined in RFC 7230 and RFC 3986

查找原因

具体原因是,从 7.0.88 开始,Tomcat为了安全考虑,不在支持[,]这种参数传递方式了。

解决方案

解决办法如下,修改 $TOMCAT_HOME/conf/server.xml,新增 relaxedQueryChars="[,]"选项。

<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8444" relaxedQueryChars="[,]"/>
posted @ 2019-06-28 11:22  朝明  阅读(671)  评论(0编辑  收藏  举报