首页 > Web开发 > 详细

HTTP Status 400 – Bad Request Type Status Report Description The server cannot or will not process the request due to something that is perceived to be a client error

时间:2021-07-08 18:19:32      阅读:30      评论:0      收藏:0      [点我收藏+]

我碰到这个问题时的场景是这样的:

前端页面跳转时,将一些数据放在url中,再到下个页面去接收,代码是这样的

技术分享图片

 

 之前在红框的地方之前直接写的 url,自己在idea上本地开发的时候,没有出现问题,但是发布到服务器上之后就报了400的错误,发现当所传数据中含有非法字符时就会报错,跟tomcat版本好像有关,因为服务器上的tomcat版本最近升级到9.0.43版本了。

然后用了encodeURI()转义函数就好了,希望对大家有帮助.

HTTP Status 400 – Bad Request Type Status Report Description The server cannot or will not process the request due to something that is perceived to be a client error

原文:https://www.cnblogs.com/cy1998/p/14985979.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!