javascript - 浏览器请求服务器遇到412报错,咋回事?
PHP中文网
PHP中文网 2017-04-11 09:51:08
[JavaScript讨论组]

我做一个生成html页面的功能,在浏览器准备好需要生成页面的html代码,以post方式,html代码作为参数传给生成页面功能的php文件,php拿这些html代码进行写文件操作并且返回该文件路径,浏览器收到路径跳转到生成后的页面。

我在本地服务器很正常没有报错,在外网服务器却报了412错误,报错内容如下:

412 Error

Your request got filtered out due to possible security issues.

One or more things in your request were suspicious (defective request header, invalid cookies, bad parameters)

If you think you did nothing wrong:

try again with a different browser
avoid any evil characters inside the request url
If you are the owner of the website, you can consider revising the rules of the mod_security module or turning it off from your Web Hosting Control Panel.
PHP中文网
PHP中文网

认证高级PHP讲师

全部回复(2)
迷茫

mod_security 服务器这个模块,阻止了这次请求,因为可能会有安全漏洞,例如xss。

迷茫

412错误我最近也遇到了。Chrome下加载视频时出现了。ETag问题
https://iyaozhen.com/a-strang...

不过和你这个有点不一样

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号