Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download link to RDP file in IE9

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
like image 315
Parzifal Avatar asked Feb 22 '23 02:02

Parzifal


1 Answers

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
like image 111
Dan Ports Avatar answered Mar 03 '23 12:03

Dan Ports