Invalid character found in the request target.
背景:springboot项目内置tomcat9.0
调用的接口中有{}就会报错
解决办法:
新的tomcat新版本增加了一个新特性,就是严格按照 RFC 3986规范进行访问解析,而 RFC 3986规范定义了Url中只允许包含英文字母(a-zA-Z)、数字(0-9)、-_.~4个特殊字符以及所有保留字符(RFC3986中指定了以下字符为保留字符:! * ’ ( ) ; : @ & = + $ , / ? # [ ])。
由于请求中包含了特殊的保留字符,所以tomcat无法正确解析请求参数,导致出错。
解决方法:
1.降低tomcat的版本。
2.采用最新tomcat版本。对请求链接进行编码,并修改对应的过滤器,对所有请求链接进行编码解析处理。
参考资料:
1.tomcat升级后报错: Invalid character found in the request target.
Invalid character found in the request target.的更多相关文章
- 【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 ...
- 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 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 ...
- 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 ...
- 后台报错java.lang.IllegalArgumentException: Invalid character found in the request target.
报错: Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang ...
- 解决springboot项目请求出现非法字符问题 java.lang.IllegalArgumentException:Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
springboot版本: 2.1.5 最近使用springboot搭建了一个App后台服务的项目,开发接口的时候在本机使用postman工具做请求测试,请求返回一直很正常,但是在前端开发使用h5请求 ...
- java.lang.IllegalArgumentException: Invalid character found in the request target. The valid charact
线上环境中部署的 Tomcat 项目,出现部分页面无法打开的情况,但本地环境是好的.经过排查发现,本地 Tomcat版本为 7.0.77,而线上版本为 7.0.88.报错的具体描述为java.lang ...
- 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 ...
随机推荐
- as报错
android studio报错报错一:Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/tools/build/ ...
- 简洁架构的思想,基于go实现
https://manuel.kiessling.net/2012/09/28/applying-the-clean-architecture-to-go-applications/ 从 Clean- ...
- MySQL常用函数介绍
MySQL常用函数介绍 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.操作符介绍 1>.操作符优先级 mysql; +----------+ | +----------+ ...
- Linux记录-配置sudoers无密登录和环境变量
su root vim /etc/sudoers.d/sfapp sfapp ALL=(ALL) ALLsfapp ALL=(ALL) NOPASSWD: ALL Defaults !env_rese ...
- C#设计模式(13)——享元模式
1.享元模式介绍 在软件开发中我们经常遇到多次使用相似或者相同对象的情况,如果每次使用这个对象都去new一个新的实例会很浪费资源.这时候很多人会想到前边介绍过的一个设计模式:原型模式,原型模式通过拷贝 ...
- canvas.drawImage()方法详解
首先看html5.js /**@param {Element} img_elem@param {Number} dx_or_sx@param {Number} dy_or_sy@param {Numb ...
- ibatis项目启动报错The string "--" is not permitted within comments【原】
该错误主要就是因为xml中<!-- [注释]--> 注释与-->之间没有空格造成xml解析错误 sqlMapConfig.xml内容如下 <?xml version=" ...
- forEach、for in、for of 三者对比
forEach forEach专门用来循环数组,可以直接取到元素,同时也可以取到index值 存在局限性,不能continue跳过或者break终止循环,没有返回值,不能return let arr ...
- 028、限制容器对CPU的使用(2019-01-23 周三)
参考https://www.cnblogs.com/CloudMan6/p/7003199.html 默认情况下,所有容器都可以平等的使用host cpu资源,没有限制 docker 可以通过 ...
- 404.17 - 动态内容通过通配符 MIME 映射映射到静态文件处理程序
刚刚重装了系统,原有的ASP.NET工程下面的WebService无法运行,如下: 404.17 - 动态内容通过通配符 MIME 映射映射到静态文件处理程序 微软的提示,是做三项更改,但是我改了之后 ...