当前位置:网站首页>在请求目标中找到无效字符。有效字符在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="|{}[],%"/>
加上红色框中的代码 问题解决。或者替换以上的代码也可。
边栏推荐
猜你喜欢

Wxml template syntax, wxss template style, global configuration, page configuration, and network data request
![[crawler notes 2] mouse events, screenshots and common attack methods](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[crawler notes 2] mouse events, screenshots and common attack methods

cmd看控制台输出红桃、方块、黑桃、梅花乱码解决

Scheduling function: Splunk operator Controller Manager

3de从设计中恢复

聊聊flink水位线

克隆的vmware虚拟主机网卡无法启动解决办法

Introduction and use of kubernetes
![[microservices | Nacos] quickly realize the configuration center function of Nacos, and complete configuration update and version iteration](/img/20/4c4a062ac7a4d265cde236ee677ac1.png)
[microservices | Nacos] quickly realize the configuration center function of Nacos, and complete configuration update and version iteration

【NVMe2.0b 5】NVM Subsystem
随机推荐
克隆的vmware虚拟主机网卡无法启动解决办法
TX2 mirror source settings
golang并发编程之原子操作详解
snappy格式解析
[qnx hypervisor 2.2 user manual]5.5 starting and using guest
Nepal graph learning Chapter 2_ A bug before version v2.6.1 caused OOM
你是一名技术管理者还是项目管理者?
美容院怎样做活动
Rabbmitmq simple mode < 1 >
Vs loading symbols causes program to start slowly
php使用composer
泛微 E-cology V9 信息泄露漏洞
[nvme2.0b 5] sous - système nvm
服装实体店如何突破销售困境
fastdfs5.0.11安装
Splunk: Auto load Balanced TCP Output issue
rabbmitMQ 发布订阅模式<二>
R数据分析:临床预测模型中校准曲线和DCA曲线的意义与做法
逆向crackme之ESp定律脱壳
golang并发编程之select