java.lang.IllegalArgumentException: Invalid character found in the request target

mac2026-08-03  1

ERROR: java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

解决方案

在tomcat/conf/server.xml的Connector标签中添加两个属性

relaxedPathChars="[]{}|^"relaxedQueryChars="[]{}|^" <Connector port="8080" protocol="HTTP/1.1" relaxedPathChars="[]{}|\^" relaxedQueryChars="[]{}|\^" />
最新回复(0)