在 IE9 中下载 RDP 文件的链接

发布于 2024-12-22 01:11:30 字数 478 浏览 0 评论 0原文

我有一个网站,其中包含 RDP 文件的链接。当用户单击链接时,应提供文件下载。它适用于所有浏览器,也适用于本地主机上的 IE9。但在线时,IE9无法识别文件类型和文件名,点击保存会出错。我是否忘记了正确的标题?或者是否有一些受信任的站点设置我必须更改,因为它在本地主机上工作?

访问 rdp 文件时得到以下标头:

Date: Mon, 19 Dec 2011 12:58:50 GMT
Content-Disposition: attachment; filename="Demo_WIN.rdp"
Content-Type: application/octet-stream;charset=UTF-8
Content-Length: 72
Keep-Alive: timeout=15, max=46
Connection: Keep-Alive

username:s:Tester431
full address:s:176.1.2.3
domain:s:MYRDP

I have a website containing a link to an RDP file. When the user clicks the link, the file should be offered as a download. It works with every browser, also in IE9 on localhost. But online, IE9 does not recognize the file type and the file name, and clicking on save causes an error. Did I forget a correct header? Or are there some trusted site settings I have to change since it works on localhost?

I get the following headers when accessing the rdp file:

Date: Mon, 19 Dec 2011 12:58:50 GMT
Content-Disposition: attachment; filename="Demo_WIN.rdp"
Content-Type: application/octet-stream;charset=UTF-8
Content-Length: 72
Keep-Alive: timeout=15, max=46
Connection: Keep-Alive

username:s:Tester431
full address:s:176.1.2.3
domain:s:MYRDP

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

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

发布评论

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

评论(1

远山浅 2024-12-29 01:11:30

我认为您需要将内容类型设置为“application/rdp”。以下是我使用的相关标头,它们适用于我尝试过的每个浏览器,包括 IE9:

Content-Type: application/rdp; charset=utf-8
Content-Disposition: attachment; filename=Application.rdp

I think you need to set the content type to "application/rdp". Here are the relevant headers I use, which work on every browser I've tried, including IE9:

Content-Type: application/rdp; charset=utf-8
Content-Disposition: attachment; filename=Application.rdp
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文