drne47241 2011-08-25 14:05
浏览 618

如何解决“拒绝设置不安全标头:连接”?

I'm using Prototype combined with CodeIgniter to submit an AJAX request. My browser is Chrome. I'm receiving an error in the console that reads "Refused to set Unsafe Header: Connection". Here is the Ajax Request line:

new Ajax.Request('/vbs/index.php/signup/get_ratecenters',{method:'POST', evalScripts:true})

I've attempted to set the type to synchronous, but received the same error.

Can someone assist? Thanks in advance.

  • 写回答

2条回答 默认 最新

  • dpy3846 2011-08-25 14:17
    关注

    What happens if you load /vbs/index.php/signup/get_ratecenters directly in your browser?

    I read somewhere online that "Refused to set Unsafe Header: Connection" is a warning that the HTTP "Connection" header cannot be set, but doesn't mean the request will not be processed, so it's possible something else is going on here?

    Check /vbs/index.php/signup/get_ratecenters and make sure it returns valid JavaScript code. Execute that code in the Chrome console and make sure it is error free... possibly here's a different error here.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错