|
May 17, 2007
My DMG is Bwoken After Download!
Today we're ran into a rather obscure situation. Rosyna has created a bz2-compressed DMG image for the new beta of the next major update to FontCard, and when I went to download it, I've noticed that Safari downloads it as "fontcard-xxx.dmg.bz2". Needless to say, it tried to expand the bz2 file upon downloading, and then failed miserably on mounting the expanded DMG file with this error: ![]() "WTF?", I thought. The file name in the URL was ending with "dmg" and not "dmg.bz2". Yes, the data inside of the DMG is compressed using bz2, but nobody should care about that. So I tried to download the same file using FireFox, and all went just fine: the image downloaded, the file name never changed, and it mounted as it should. I've looked at the response our server been sending, and it was:
So what I am guessing is that Safari tries to guess the file type when it's not forcibly defined by the So, we've made a tiny change to our So, if you serve DMGs off your hosting, take a note on that. Luckily, the fix is simple (assuming your web host uses Apache): Open or create a
This instructs Apache to forcibly tell the visitors that files ending with "dmg" has a content type of I'd like to say thanks to Mark Rowe for telling us the "right" MIME type. ;) Trackback Pings: TrackBack URL for this entry: Related:
Comments
Interesting, I had a big problem with this myself with Quicksilver. http://getqs.com downloads a .dmg.bz2 image for me in Safari, but not in Camino or Firefox. I read about the fix on Macupdate, but it still isn't fixed. Posted by: ACoolie on May 17, 2007 1:10 PMhiatus Suggested alternatives:
————— On another note, thanks for posting this. It'll come in handy if I ever find myself serving DMG files. Posted by: Arden on May 19, 2007 5:33 PMHow can I get FruitMenu to show my real world IP address? Instead of 10.0.1.1 in my Apple Menu? Posted by: Court Kizer on May 22, 2007 7:58 PMI think I saw this same problem with the SourceForge download of the latest aMSN distribution. I'd thought they were just out of their vulcan minds and for some reason decided to distribute aMSN as a dmg.bz2 ;) (I have my Safari set not to auto-open things and so was just left with a dmg.bz2 file in the Finer. Of course, BOMArchive helper refused to decompress it. Going to FireFox solved the problem of course so I never thought of it again until now. Thanks for posting this useful stuff. Has anyone used the .htaccess trick on .Mac? I created one in my Sites folder (which I point to as a backup server). While I have never seen this bug, a user reports there's still a problem. Posted by: David Dunham on June 1, 2008 8:56 PMI've only seen users of The Unarchiver running into this issue. I've been in contact with the developer and it IS a Mac OS bug, but doesn't show itself on a default OS X install. Some of the file types that The Unarchiver registers to handle give Safari extra options for identifying files, and it incorrectly identifies some disk images (maybe ones with bzip2 compression) as tar+bzip2 archives. You can work around the problem by opening The Unarchiver preferences and unchecking "Bzip2 Tar Archive" in its list of archive formats. Posted by: Sidney San Martín on June 2, 2009 8:15 AMKeep comments on topic. If a comment is unrelated to this post, it may be removed or moderated. |


