问题记录:
本地tomcat是7.0.56,运行没有问题的;然后发布到服务器tomcat为7.0.81,问题就来了,报错
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
查了一下资料原因就在于版本升级了导致;
解决方法:
/conf/catalina.properties中,找到最后注释掉的一行 #tomcat.util.http.parser.HttpParser.requestTargetAllow=| ,去掉注释,改成tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}
最后重启