Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC

简介: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC

Tomcat高版本遇到这个错误,其实很简单。

在配置文件加上这个即可:

relaxedPathChars="<>[]^{|}" relaxedQueryChars="&lt;&gt;[\]^{|}"

在这里插入图片描述

除了上边这个报错原因,可能还会遇到下面这个报错,都是同样的解决方法。

HTTP Status 400 – Bad Request
在这里插入图片描述

相关文章
|
7月前
|
应用服务中间件
The valid characters are defined in RFC XXXX
The valid characters are defined in RFC XXXX
38 0
Invalid mapping pattern detected: /download/{{fileName}} ^Not allowed to nest variable c
Invalid mapping pattern detected: /download/{{fileName}} ^Not allowed to nest variable c
|
JSON JavaScript 应用服务中间件
关于The valid characters are defined in RFC 7230 and RFC 3986问题
建议从目前的角度出发使用第三种方式降低tomcat版本就可以了,如果从长远出发的话,建议遵循RFC 7230 and RFC 3986规范,对于非保留字字符(json格式的请求参数)做转义操作。
1371 0
关于The valid characters are defined in RFC 7230 and RFC 3986问题
|
编解码 前端开发 JavaScript
IE上的 The valid characters are defined in RFC 7230 and RFC 3986 坑的解决方法
IE上的 The valid characters are defined in RFC 7230 and RFC 3986 坑的解决方法
269 2
|
JSON 数据格式
JsonParseException: Unexpected character (‘ï‘ (code 239)): was expecting comma to separate Object
JsonParseException: Unexpected character (‘ï‘ (code 239)): was expecting comma to separate Object
266 0
|
JSON 数据格式
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
遇到【Unexpected character (‘“‘ (code 34)): was expecting comma to separate Object entries】的解决办法
|
Linux
Specified sample format -1 is invalid or not supported
Specified sample format -1 is invalid or not supported
223 0
Specified sample format -1 is invalid or not supported
|
应用服务中间件
Tomcat请求特殊字符参数问题:Invalid character found in the request target. The valid characters are defined in
Tomcat请求特殊字符参数问题:Invalid character found in the request target. The valid characters are defined in
729 0
Tomcat请求特殊字符参数问题:Invalid character found in the request target. The valid characters are defined in
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
142 0