终极解决方案: Invalid character found in the request target.
终极解决方案:(导出可能出现)
我的tomcat版本是8.5.32,导出时遇到以下报错。
报错日志:
Invalid character found in the request target. The valid characters are defined in RFC 3986
从错误日志中看到对请求URL中对字符做了限制。
解决方法:
1.在tomcat安装路径中conf/catalina.properties中最后添加2行:
tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}
org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
网上还有一些掩耳盗铃的做法,就是降低tomcat的版本。Tomcat在 8.5版本后,在http解析时做了严格限制。
requestTargetAllow 只能配置|、{、} 这三个字符,对于其他的(例如" < > [ \ ] ^ ` { | } .),依旧报错,如果使用了|{}之外的其他字符,那就还需要如下配置。
2.在conf/server.xml中的<Connector>节点中,添加2个属性(可以接收任意特殊字符的组合,自行配置):
relaxedPathChars="|{}[],\"
relaxedQueryChars="|{}[],\"
终极解决方案: Invalid character found in the request target.的更多相关文章
- 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 ...
- 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 RF ...
- tomcat Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
1.情景展示 tomcat 日志时不时会报出如下异常信息,到底是怎么回事? java.lang.IllegalArgumentException: Invalid character found ...
- 已解决:Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986 问题
请求: http://127.0.0.1:8080/driverApp/findLikeAddress?json={"shopname":"广东省"," ...
- 【Tomcat】Invalid character found in the request target
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC ...
- Tomcat v7.0 java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
十二月 , :: 下午 org.apache.coyote.http11.AbstractHttp11Processor process 信息: Error parsing HTTP request ...
- Invalid character found in the request target.
背景:springboot项目内置tomcat9.0 调用的接口中有{}就会报错 解决办法: 新的tomcat新版本增加了一个新特性,就是严格按照 RFC 3986规范进行访问解析,而 RFC 398 ...
- java.lang.IllegalArgumentException: Invalid character found in the request target.
java.lang.IllegalArgumentException: Invalid character found in the request target. http参数存在特殊字符: 特殊字 ...
- Tomcat : Invalid character found in the request target
Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC ...
随机推荐
- python-zx笔记11-测试压力管理
一.添加测试用例 calculator.py class Math: def __init__(self,a,b): self.a = int(a) self.b = int(b) def add(s ...
- python-zx笔记10-断言
断言 断言内容是自动化脚本的重要内容,正确设置断言以后才能帮助我们判断测试用例执行结果. 断言方法 assertEqual(a, b) 判断a==b assertNotEqual(a, b) 判断a! ...
- [CSP-S模拟测试]:砖块(模拟)
题目描述 在一个二维网格平面上,一个网格的坐标由其左下角的点的坐标定义$(x,y)$.在一个二维网格平面上,一个网格的坐标由其左下角的个点的坐标定义$(0,0)$的区域中,此时存在高度为$k$的初始砖 ...
- 电脑如何连接windows server服务器
第一步:win+r 启动‘运行’,输入mstsc 第二步:连接远程桌面,输入服务器ip 第三步,输入账户密码,登陆即可. 注释:mstsc,全称 Microsoft Telnet Screen Con ...
- 去掉注释index.html
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Conten ...
- C#-概念-类:类
ylbtech-C#-概念-类:类 类(Class)是面向对象程序设计(OOP,Object-Oriented Programming)实现信息封装的基础.类是一种用户定义类型,也称类类型.每个类包含 ...
- Jetty在idea中运行
文章目录 下载 配置 运行时报错 请求 下载 https://download.csdn.net/download/again_vivi/9796169 解压到任意目录 配置 configuratio ...
- kali 修改MariaDB密码
use mysql; update user set authentication_string=PASSWORD("") where User='root'; update us ...
- jmeter uniq 取值方式设置
- Python入门习题6.猜数游戏和其异常处理
例6:在程序中预设一个0~9之间的整数,让用户通过键盘输入所猜的数,如果大于预设的数,显示“遗憾,太大了”:小于预设的数,显示“遗憾,太小了”,如此循环,直至猜中数,显示”预测N次,猜中了”,其中N是 ...