Opened 8 years ago

Last modified 7 years ago

#7353 new enhancement

Expander: use mime type/sniffer to detect archive type as fallback

Reported by: umccullough Owned by: korli
Priority: normal Milestone: R1
Component: Applications/Expander Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


It seems that I have downloaded a .tgz file that has the wrong extension (it's actually a .tar). Someone told me this was possibly a Web+ bug, but that doesn't matter.

What I'd like is for Expander to not fail trying to extract this file, but to recognize it's really a .tar file instead. It seems the mime sniffer has figured this out, so it would be nice if that was the fallback when no files were located in the archive based on the extension.

The file in question is the tuxpaint archive downloaded from here using Web+:

Note, when I download it with Chrome on Windows, it does appear to be a proper .tgz, but with Web+ on Haiku, I have to rename it .tar (or eliminate the extension entirely) before Expander can unarchive it.

Change History (3)

comment:1 Changed 8 years ago by phoudoin

Regarding to any zip or gzip file downloaded via WebPositive, it will be corrupted because in fact the file is on-the-fly decompressed by the curl network backend Web+ currently use.

This behavior is governed by CURLOPT_HTTP_CONTENT_DECODING and CURLOPT_HTTP_TRANSFER_DECODING options, which currently are not set to FALSE.

comment:2 Changed 8 years ago by axeld

Only the latter really sounds like the option to change; the HTTP content should be decoded, or maybe WebKit has support for this as well itself.

comment:3 Changed 7 years ago by diver

Component: - GeneralApplications/Expander
Owner: changed from nobody to korli
Note: See TracTickets for help on using tickets.