Tomcat设置URL兼容特殊符号
程序员文章站
2024-02-28 23:46:16
...
catalina.properties配置:
tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}[]
org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
server.xml配置:
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
relaxedPathChars="[]|"
relaxedQueryChars="[]|{}^\`"<>"
useBodyEncodingForURI="true"
URIEncoding="UTF-8"/>