views:

175

answers:

3

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.

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

update 2 Figured it out. The key to getting IE to behave was setting the content-disposition header to 'attachment.'

AddType application/octet-stream .ipa
<Files *.ipa>
  Header set Content-Disposition attachment
</Files>
+3  A: 

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.

Carl Norum
Well, yeah. Creating the .ipa is simply a matter of zipping up the files and changing the extension. Maybe a better way of phrasing the question would be how do I prevent IE from changing my file extension?
Greg W
@Greg W, that might be a better question for http://superuser.com.
Carl Norum
+1  A: 

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

epatel
Interesting... I'm not entirely opposed to using some PHP to get the job done. A full blown framework probably isn't what I'm after (at least for now) but I'll definitely look it over.
Greg W
A: 

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>
Greg W