Flash 安全沙箱问题:attachment

错误:

Error #2044: 未处理的 securityError:。 text=Error #2190: 尝试加载 http://10.2.39.23:12007/grs-service/doc/download/20111229-dc13d0b0d3eb4598802f6e156e3c7670.swf 失败,因为它已设置 attachment 的 Content-Disposition。

解决方法见:

http://www.cnblogs.com/coonooo/archive/2011/06/11/fkeditor_flash_cant_play.html

HTTP头中去掉“Content-Disposition ”,Flash就能正常访问,虽后问题解决了,但从小就培养出的刨根问题的优良品格使我在脑袋当中出现了一个大大的问号“?”,“WHY?”,最后通过强大的Google search 我终于得到了答案,以下引用原文:

Starting with version 10,0,2, if Flash Player sees a " Content-Disposition: attachment" header while downloading a SWF file, it will ignore the SWF file rather than play it. Note that this restriction applies only to SWF files and not to other types of content, such as images, sounds, text, or XML files, policy files, etc.

If you control the HTTP server on which the SWF file resides, determine whether you trust the SWF file to execute in the server's domain. If so, remove the "Content-Disposition: attachment" header by changing your HTTP server's configuration.
其大致意思就是:从Flash 10.0.2后,flash会忽略 那些HTTP返回的头中包含了“ Content-Disposition: attachment”的SWF文件,其他文件比如FLASH中引用的图片、声音、文本、XMl等其他文件不做此限制。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值