The valid characters are defined in RFC 7230 and RFC 3986

After starting tomcat, the error in the runtime is as follows: java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 The
reason for the error: For tomcat version 8.0 and above, the request parameter header is checked. The

solution is as follows:
the first solution: reduce the version of tomcat to below 8.0; the


second solution:
open the catalina.properties file in the conf directory of tomcat, and add the following to the last line of this file:
tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}
org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

and then restart tomcat

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327058303&siteId=291194637