标签:toc 添加 rect utf-8 消息 character 中文 请求 更换
公司tomcat从8.0.22更换到高版本的9.0.22以后,postman请求没问题,但是终端请求总是400
报Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986错,
解决:
在tomcat的conf/server.xml 的Connector中添加:relaxedQueryChars="{}|[],%" relaxedPathChars="[]|{},%"
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000"
relaxedQueryChars="[]|{}^\`"<>" redirectPort="8443" />
有中文的话加上:URIEncoding="UTF-8"。
标签:toc 添加 rect utf-8 消息 character 中文 请求 更换
原文地址:https://www.cnblogs.com/onroad2019/p/11642096.html