IE浏览器报400错误:Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
前言:
在用IE浏览器时访问tomcat项目时,页面报400错误,后台错误:
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
在网上查得资料时因为Tomcat版本在7以后会对http头进行验证,不符合规范的就会抛出异常
而IE浏览器无法对URL自动转义
解决办法:
1.使用encodeURI函数
2.JS使用post请求
//发送POST请求跳转到指定页面
function httpPost(URL, PARAMS) {
var temp = document.createElement("form");
temp.action = URL;
temp.method = "post";
temp.style.display = "none";
for (var x in PARAMS) {
var opt = document.createElement("textarea");
opt.name = x;
opt.value = PARAMS[x];
temp.appendChild(opt);
}
document.body.appendChild(temp);
temp.submit();
return temp;
}
IE浏览器报400错误:Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986的更多相关文章
- IE浏览器连接WebSocket报错:java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
在项目开发中整合了WebSocket,本来没什么问题了,但是偶尔发现用IE浏览器打开web端不能推送消息,因为PC端与服务器建立连接失败了.网上查了很多资料, 又看了看源码,都不对症:又怀疑是Spri ...
- Tomcat报错Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
问题描述:后台报错 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.java ...
- 解决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请求 ...
- 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 ...
- 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 3986 问题
请求: http://127.0.0.1:8080/driverApp/findLikeAddress?json={"shopname":"广东省"," ...
- 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. The valid characters are defined in RFC 3986
一.背景 事情是这样的,前几天做一个基本的数据库“增删改查”的需求,前端传参的方式是“JSON字符串”,后端接收到此参数后,使用阿里巴巴fastjson进行解析,然后入库.需求很简单吧,但是偏偏遇到问 ...
- 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 ...
随机推荐
- WPF 中的DataTemplate 的嵌套
<Window x:Class="WPF.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xa ...
- CentOS_Server with GUI入门
安装模式: Server with GUI:基本的桌面系统,包括常用的桌面软件,如文档查看工具 Minimal:基本的系统,不含有任何可选的软件包 Basic Server :安装的基本系统的平台支持 ...
- NX二次开发-使用NXOPEN C++向导模板做二次开发
版本 NX9+VS2012 1.怎么往VS软件里添加VC,C#,VB向导模板 先到NX安装目录下UGOPEN文件夹里找到这三个文件夹 拷贝到VS的安装目录下 这里有几个注意事项,VS2017,VS20 ...
- 解决win10 cmd运行python弹出windows应用商店下python应用程序
方法一: 1.我一开始下载完python后,忘记下载到哪个位置,在win10底下输入框搜索python,点击打开文件所在位置,所在位置是python快捷键的位置,直接复制进行环境配置 配置完环境变量后 ...
- Redis核心原理与实践--字符串实现原理
Redis是一个键值对数据库(key-value DB),下面是一个简单的Redis的命令: > SET msg "hello wolrd" 该命令将键"msg&q ...
- 解决FTPClient下载网络文件线程挂起问题
今天在windows上调试FTP下载文件时,出险线程假死,代码如下: if (inputStream != null) { byte[] data = null; ByteArrayOutputStr ...
- npm配置镜像及nrm使用
淘宝npm镜像 搜索地址:http://npm.taobao.org/ registry地址:http://registry.npm.taobao.org/ cnpmjs镜像 搜索地址:http: ...
- TreeListLookUpEdit控件使用
绑定数据 treeListLookUpEdit1.Properties.DataSource=list;增加列treeListLookUpEdit1.Properties.TreeList.Colum ...
- Servlet体系结构
一.使用HttpServlet 其中,HttpServlet在重写的service()方法中对http请求的共7中提交方式进行了判断,所以只要我们只要重写对应的请求方式处理逻辑方法 doGet()和d ...
- SpringBoot-Web-初见
目录 怎么开发一个网站? 静态资源 找到静态资源的存放目录 扩展自定义路径 首页定制 模板引擎Thymeleaf 员工管理系统-初见 国际化 国际化实现 编写国际化配置类 登陆功能 编写index.h ...