The valid characters are defined in RFC XXXX

简介: The valid characters are defined in RFC XXXX

问题如下:

1.

Message Invalid character found in the request target [/tb/TbRecordfile/v1/list?_t=1640844375&constructionId=5&pageNo=1&pageSize=8&floorNum[]=7&userId=1442419677027749890&buildingNum=6-2&buildingId=1&currentUserId=1422835748520980481]. The valid characters are defined in RFC 7230 and RFC 3986
 

2.

java.lang.IllegalArgumentException: Invalid character found in the request target [/tb/TbRecordfile/v1/list?_t=1640844375&constructionId=5&pageNo=1&pageSize=8&floorNum[]=7&userId=1442419677027749890&buildingNum=6-2&buildingId=1&currentUserId=1422835748520980481]. The valid characters are defined in RFC 7230 and RFC 3986

说明也就是URL中出现特殊字符了:

(1)RFC 3986文档规定,Url中只允许包含英文字母(a-z,A-Z)、数字(0-9)、- _ . ~ 4个特殊字符以及所有保留字符。

(2)RFC3986中指定了以下字符为保留字符:! * ’ ( ) ; : @ & = + $ , / ? # [ ]

解决方案:

1.使用Tomcat7.0.69之前的版本;

2.对url的特殊字符进行转义

3.修改tomcat配置文件

4.

相关文章
Invalid mapping pattern detected: /download/{{fileName}} ^Not allowed to nest variable c
Invalid mapping pattern detected: /download/{{fileName}} ^Not allowed to nest variable c
|
5月前
|
Python
【已解决】WARNING: Ignoring invalid distribution xxx
【已解决】WARNING: Ignoring invalid distribution xxx
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
|
JSON JavaScript 应用服务中间件
关于The valid characters are defined in RFC 7230 and RFC 3986问题
建议从目前的角度出发使用第三种方式降低tomcat版本就可以了,如果从长远出发的话,建议遵循RFC 7230 and RFC 3986规范,对于非保留字字符(json格式的请求参数)做转义操作。
1156 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 坑的解决方法
244 2
|
Linux
Specified sample format -1 is invalid or not supported
Specified sample format -1 is invalid or not supported
217 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
695 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‘
139 0
|
Java Maven Android开发
Maven项目报错invalid LOC header (bad signature)
Maven项目报错invalid LOC header (bad signature)
149 0
Maven项目报错invalid LOC header (bad signature)
|
C语言
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
147 0
下一篇
无影云桌面