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
|
6月前
|
JavaScript
Invalid project name: “Philosophers-Stone“Warning: name can no longer contain capital letters
Invalid project name: “Philosophers-Stone“Warning: name can no longer contain capital letters
|
6月前
|
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格式的请求参数)做转义操作。
1529 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 坑的解决方法
287 2
|
Linux
Specified sample format -1 is invalid or not supported
Specified sample format -1 is invalid or not supported
228 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
751 0
Tomcat请求特殊字符参数问题:Invalid character found in the request target. The valid characters are defined in
|
Java Maven
invalid LOC header (bad signature) 错误解决办法
invalid LOC header (bad signature) 错误解决办法
663 0
|
应用服务中间件 数据格式 JSON
Tomcat 8 Invalid character found in the request target. The valid characters are defined in RFC 3986
终极解决方案: Invalid character found in the request target. The valid characters are defined in RFC 3986 25-Aug-2018 11:27:27.
21192 0