zotero/zotero — pull request #262 by aurimasv (2013-03-03 00:55:15+00:00)
Title: Don't attach snapshots when option is unchecked and no mimeType is supplied

When mimeType is not supplied, try to fetch it from server and redo checks for automatic snapshots.

Re http://forums.zotero.org/discussion/28055/zotero-downloads-then-deletes-pdf/#Item_10
>2) http://jcp.aip.org/resource/1/jcpsa6/v138/i3/p034703_s1
Webpage snapshot added, which is not expected, because in general preferences the corresponding field are untick

Which stems from the AIP translator https://github.com/zotero/translators/blob/master/AIP.js#L50 indicating mimeType in the type attribute instead of mimeType. However, this is what the Framework documentation recommends http://www.zotero.org/support/dev/translators/framework but in that case Framework should compensate for this and convert type to mimeType.

Either way, when no mimeType was supplied, the attachment would pass the snapshot option check no matter what, but then a mimeType check through a HEAD request would result in 'text/html' mimeType and the attachment would be attached as Snapshot.

This fixes the latter behavior. We should still address the Framework issue to avoid the unnecessary HEAD requests.