e.g., malformed request syntax, invalid request message framing, or deceptive request routing)

一. 问题背景

后台:SSM框架
前端:用ajax发送请求

描述:用ajax发送请求,出现e.g., malformed request syntax, invalid request message framing, or deceptive request routing)报错

二. 分析

报错的句子中出现了多个request单词,还有一个message,一个routing,大概意思是request请求出现错误或者这是一个欺骗性的 误导的骗人的请求

三. 解决方案

  • 检查contoller方法接收参数的类型是否错误,一般ajax传来的参数都是用String来接收。例如:
$.ajax({
	url: getRootPath + '/order/deleteOrders',
	type: 'POST',
	data: {'ids':ids, "order_id": order_id},
	dataType: 'json',
	success: function(result){
		    if(result.code==0){
 			layer.msg(result.msg, {icon: 1, time: 2000});
 			renderTable();
		    }else{
		    	layer.msg(result.msg, {icon: 2, time: 2000});
		    }
	}
}); 

解释: 上面的data中传去后台的参数,后台几乎都是用String类型接收的,不能用Integer,除非是分页请求的ajax,后台才用Integer接收page和limit(这里指的是使用前端的layui库)

将contoller中的方法参数类型改为String即可

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
---------ChromeDriver 75.0.3770.140 (2019-07-12)--------- Supports Chrome version 75 Resolved issue 3007: ChromeDriver 75 - Running Javascript kills driver [Pri-1] Resolved issue 2943: goog:chromeOptions.w3c=false doesn't work for POST request with empty body [Pri-1] Resolved issue 2975: Webdriver Actions for keys (CONTROL, SHIFT etc..) not working in ChromeDriver 75.0.3770.8 [Pri-2] Resolved issue 2947: No W3C compliant endpoints for retrieving logs [Pri-2] Resolved issue 2622: Clear Element command raises blur event twice [Pri-2] Resolved issue 2803: Capability name loggingPrefs is not spec compliant [Pri-2] Resolved issue 2536: Make standards mode (goog:chromeOptions.w3c:true) the default [Pri-2] Resolved issue 2836: Error handling in W3C mode [Pri-2] Resolved issue 2414: Creating cookies without leading dot in the domain results in host-only cookies [Pri-2] Resolved issue 2796: ChromeDriver should allow null for script timeout [Pri-2] Resolved issue 2721: Element Send Keys to file input with 'multiple' attribute should append file list [Pri-3] Resolved issue 2850: Get Active Element should return "no such element" error when no active element exists [Pri-3] Resolved issue 2851: Navigate to malformed URL should raise "invalid argument" error [Pri-3] Resolved issue 2857: ChromeDriver returns wrong HTTP status code when invalid session id is received [Pri-3] Resolved issue 2719: When input parameter is missing or malformed, ChromeDriver response is not spec compliant [Pri-3] Resolved issue 2746: Execute Script does not handle line-oriented JavaScript comment [Pri-3]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值