当前位置:网站首页>在请求目标中找到无效字符。有效字符在RFC 7230和RFC 3986中定义
在请求目标中找到无效字符。有效字符在RFC 7230和RFC 3986中定义
2022-06-22 03:27:00 【胡八一】
问题:


原因分析:
是因为 日志显示请求地址中包含不合法字符,出现400错误
tomcat高版本严格按照RFC 3986规范解析地址。该规范只允许包含 a-zA-Z 0-9 - _ . ~ 以及所有保留字符 ! * ’ ( ) ; : @ & = + $ , / ? # [ ]
但是项目在发起请求的参数中出现{},所以需要配置一下
解决方法:
网上最多采用的方法,将tomcat中的server.xml文件添加如下配置:
relaxedPathChars="|{}[],%" relaxedQueryChars="|{}[],%"
在tomcat配置文件中做出以下配置,找到tomcat配置中的server.xml路径就在conf文件夹下

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URIEncoding="UTF-8" relaxedPathChars="|{}[],%" relaxedQueryChars="|{}[],%"/>
加上红色框中的代码 问题解决。或者替换以上的代码也可。
边栏推荐
- golang标准库time
- mysql-索引创建、优化分析、索引优化
- Rabbmitmq publishing keyword mode < 3 >
- BOM attribute, method and event application cases
- What is an SSL certificate and what are the benefits of having an SSL certificate?
- [nvme2.0b 8] nvme queue arbitration mechanism
- VIM from dislike to dependence (18) -- advanced search mode
- ASUS reinstallation system keyboard lamp failure = & gt; Refitting the ATK drive
- 3de 移动物体的位置
- 告警日志中出现ORA-48132 ORA-48170
猜你喜欢

【NVMe2.0b 5】NVM Subsystem

Project Management-软件开发之项目管理

Check information on the Internet after the college entrance examination, and pay attention to prevent websites without SSL certificates

PHP uses composer

分析Iceberg合并任务解决数据冲突
![[crawler notes 1] environment construction and necessary tools selenium](/img/58/e11951ce1b240fb4ac1398cb1a8b50.png)
[crawler notes 1] environment construction and necessary tools selenium

3de 机器人吸盘抓box

Fastdfs-5.0.5 installation

美容院怎样做活动

(problem solving) missing gcr io/kubebuilder/kube-rbac-proxy:v0.8.0
随机推荐
作为接口的模板
1299. 将每个元素替换为右侧最大元素
php使用composer
618来袭,当贝X3和极米H3S怎么选?带你全方位深度解析
剑指 Offer 68 - II. 二叉树的最近公共祖先
工厂模式
[nvme2.0b 6] nvme queue model
3de 移动物体的位置
1690. 石子游戏 VII-动态规划法
Libuv asynchronous task logic and UV_ queue_ work()
webview报错
std::move与std::forward右值引用研究
2022.6.21-----leetcode. one thousand one hundred and eight
AtCoder Beginner Contest 252(dijkstra,逆向思维)
Nepal graph learning Chapter 2_ A bug before version v2.6.1 caused OOM
【 thesis 】 zero reference depth curve estimation for low light image enhancement
从根儿上理解虚拟内存
Factory mode
逆向crackme之ESp定律脱壳
[crawler notes 1] environment construction and necessary tools selenium