33
votes

I'm trying to post .ipa files onto our apache web server for our beta testers to download. Currently I'm using the following line in .htaccess to serve the files:

AddType application/octet-stream .ipa

This works great in Safari and Firefox, but in IE the .ipa extension is removed and is instead replaced with .zip. So instead of MyApp.ipa, IE users will get MyApp.zip.

I know that I could just zip up all the .ipa's before putting them onto the server and then I wouldn't have to deal with any of this, but I'd like to avoid that extra step if there is a more elegant solution server-side.

Or rather, is it possible to simply prevent IE from altering the file extension?

3

3 Answers

38
votes

I voted up the other answers as they were both helpful, but this is what I ended up needing to fix the problem.

AddType application/octet-stream .ipa
<Files *.ipa>
  Header set Content-Disposition attachment
</Files>
6
votes

A .ipa file is a zip file:

$ file 'Kindle 2.2.1.ipa' 
Kindle 2.2.1.ipa: Zip archive data, at least v1.0 to extract

That's likely why IE is helpfully changing the extension for you. Microsoft's documentation seems to indicate that might be the case:

Internet Explorer sets the file name extension of a downloaded file based on a few pieces of information available from the HTTP server and from the file itself.

2
votes

I suggest you look into Hockey which seems like a good way to distribute Ad Hoc updates more seamlessly. php based though.