1.有效解决The valid characters are defined in RFC 7230 and RFC 3986问题
配置tomcat/conf下的catalina.properties
添加或者修改:
tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}
org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
同时添加server.xml中的connector
relaxedPathChars=""><[]{}|\^"
relaxedQueryChars=""><[]{}|\^"