Javascript Error: 11233 Content-Length mismatch
2015-06-15 15:36
661 查看
Today I got a error in fiddler:
Failed to obtain request body. System.IO.InvalidDataException The request body did not contain the specified number of bytes. Got expected
11233 Content-Length mismatch: Request Header indicated 7,431 bytes, but client sent 0 bytes.
I goole all key words on web, but no any clues to root cause. Here is the script:
function ShowRatePopUP() {
ratePopUpLinkButton = document.getElementById(ratePopUpLinkButtonId);
if (ratePopUpLinkButton) {
ratePopUpLinkButton.click();
}
}
This is a simple function to access on server function "ratePopUpLinkButton.click();" , but why Content-Length in header is different with that client sent?
The root cause is "Response Confiliction". ShowRatePopUP() didnt return false, that inform the server side it will also need to request to server side. But ratePopUpLinkButton.click(); is also request to server side. Therefore just return false, fixed.
function ShowRatePopUP() {
ratePopUpLinkButton = document.getElementById(ratePopUpLinkButtonId);
if (ratePopUpLinkButton) {
ratePopUpLinkButton.click();
}
return false;
}
Failed to obtain request body. System.IO.InvalidDataException The request body did not contain the specified number of bytes. Got expected
11233 Content-Length mismatch: Request Header indicated 7,431 bytes, but client sent 0 bytes.
I goole all key words on web, but no any clues to root cause. Here is the script:
function ShowRatePopUP() {
ratePopUpLinkButton = document.getElementById(ratePopUpLinkButtonId);
if (ratePopUpLinkButton) {
ratePopUpLinkButton.click();
}
}
This is a simple function to access on server function "ratePopUpLinkButton.click();" , but why Content-Length in header is different with that client sent?
The root cause is "Response Confiliction". ShowRatePopUP() didnt return false, that inform the server side it will also need to request to server side. But ratePopUpLinkButton.click(); is also request to server side. Therefore just return false, fixed.
function ShowRatePopUP() {
ratePopUpLinkButton = document.getElementById(ratePopUpLinkButtonId);
if (ratePopUpLinkButton) {
ratePopUpLinkButton.click();
}
return false;
}
相关文章推荐
- JSP(4)----servlet编程2
- js中屏蔽a标签右键中在新窗口打开功能
- Javascript 检测键盘按键信息及键码值对应介绍
- JS知识点
- 后台调用js
- JSON实战案例--使用JSON进行数据交换实例
- Json日期转换误差
- 57 js 背景图片以及背景色
- JavaScript 常用互动方法
- Javascript模块化编程(一):模块的写法
- JS类库函数收集中....
- extjs
- [Mozilla]AJAX快速入门
- JS——事件
- js 放置位置
- JS中setTimeout()的用法详解
- js 数据函数
- js-graph-it的一个小demo
- Javascript所有数组方法(forEach,some,every,join,concat等等)
- JavaScript自动生成博文目录导航