IE 发送 OPTIONS 文件下载请求

编程入门 行业动态 更新时间:2024-10-26 09:20:45
本文介绍了IE 发送 OPTIONS 文件下载请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

在我的网站上,我有一个非常基本的设置:一个只指向一个文件的a href"标签.没什么特别的:

On my site I have a very basic setup: an 'a href' tag that just points to a file. Nothing fancy:

<a href="/path/to/my/file.doc">File</a>

没有花哨的javascript,什么都没有.一些使用低于 8 的旧 IE 版本的用户在下载这样的不同文件时遇到了不稳定的问题.我能够追溯到的是 IE 将发送一个文件的 OPTIONS 请求(即使这样也不是一直).由于我没有运行 Webdav 服务器,因此我将 mod_security 设置为默认值以拒绝那些非正常标头,因此它返回 500 响应.

No fancy javascript, nothing. Some users who are using old IE versions less than 8 have been having spotty problems downloading different files like this. What I've been able to trace it back to is that IE will send an OPTIONS request for the file (and even then not all the time). Since I'm not running a Webdav server, I had mod_security set at the default to reject those non-normal header, so it returns a 500 response.

IE8、Firefox 和 Chrome 不执行 OPTIONS 请求,因此永远不会出现问题.

IE8, Firefox, and Chrome do not do an OPTIONS request and therefore never have a problem.

我是否需要在我的一端进行不同的设置,以便 IE 停止发送 OPTIONS 请求而仅发送标准的 GET 请求?

Do I need to set something up differently on my end to IE stop sending an OPTIONS request and just a standard GET request?

运行:

CentOS 5.3Apache 2.2.8mod_security 2.5.0

推荐答案

在某个时候,我发现一篇文章说 IE 将在直接文件下载时发送 OPTIONS 请求,这只是其功能的一部分.

At some point I found an article that said that IE will send the OPTIONS request on direct file downloads as just part of how it functions.

这篇关于IE 发送 OPTIONS 文件下载请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-20 00:33:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/972664.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   OPTIONS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!