Skip to content

Add MIME sniffing to downloader

Description

Adds MIME sniffing to the downloader. It looks for special strings in the file, to identify the file format.

It reads the entire file at once, rather than use a stream. Is that okay? This is simpler and more performant than reading one char at a time.

This can't be tested properly until #262 (closed) is fixed. But it seems to identify the file formats correctly, at least from my limited testing.

Related Issues

Fixes the FIXME's in the downloader that say to add MIME sniffing.

Merge request reports

Loading