IE 发送 OPTIONS 请求文件下载

发布于 2024-08-11 05:36:34 字数 525 浏览 2 评论 0原文

在我的网站上,我有一个非常基本的设置:一个仅指向文件的“a href”标签。没什么花哨的:

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

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

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

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

运行:

  • CentOS 5.3
  • Apache 2.2.8
  • mod_security 2.5.0

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>

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, and Chrome do not do an OPTIONS request and therefore never have a problem.

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

Running:

  • CentOS 5.3
  • Apache 2.2.8
  • mod_security 2.5.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

极度宠爱 2024-08-18 05:36:34

在某个时候,我发现一篇文章说 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.

执手闯天涯 2024-08-18 05:36:34

为什么会出现 500 服务器错误?为什么不出现 405 Method Not allowed 呢? (参见 RFC2616 10.4.3)

Why 500 SERVER ERROR? Why not 405 Method Not Allowed? (See RFC2616 10.4.3)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文