Finally, I figured out how to make it work for all mime types I need to download.
Thanks hachu for mime-type tip. Yes, it depends on the server you get the file from.
Different web servers configured to have different mime-types records.
I noticed that IIS uses "application/x-zip-compressed" while nginx or apache uses "application/zip". That's why this plugin didn't work for me, I tried to get zip files from IIS which is configured to reply with "application/x-zip-compressed", this content type was not Info.plist.
Now I add extra section to Info.plist so the whole zip section should look like:
Code:
<key>application/x-zip-compressed</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>zip</string>
</array>
<key>WebPluginTypeDescription</key>
<string>zip File</string>
<key>WebPluginTypeEnabled</key>
<true/>
</dict>
<key>application/zip</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>zip</string>
</array>
<key>WebPluginTypeDescription</key>
<string>zip File</string>
<key>WebPluginTypeEnabled</key>
<true/>
</dict>
This ensures that at least two different server content types will be processed by script properly. To be sure that it works shut down Safari (press Home button several seconds till Safari turns to dark and be closed). After restart Safari succesfully passes the control to plugin, now it's possible to download zip files from different web servers. I used:
http://www.zenon.net/zip/current-official-docs.zip
http://89.108.121.59/video/test.zip
Disregard the file content, test the download capability in Safari.
Next step was to try some exe downloading. I use IIS to check, adding this section will do the trick:
Code:
<key>application/octet-stream</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>exe</string>
</array>
<key>WebPluginTypeDescription</key>
<string>exe File</string>
<key>WebPluginTypeEnabled</key>
<true/>
</dict>
To test I get the file from the same IIS server
http://www.multitran.ru/DownLoad/mtshort.exe (2 Mb)
Don't be afraid it's not a virus.
So now it's clear how to extend the scope of plugin functionality.
Bookmarks