Some shell scripts are given the .bin extension and therefore cannot be opened in firefox #27

Closed
opened 2020-09-26 00:46:49 +02:00 by 6gk · 2 comments
6gk commented 2020-09-26 00:46:49 +02:00 (Migrated from github.com)

For example: http://0x0.st/illA.bin

If I open in firefox it just downloads it, when I'd much prefer being able to preview it.

Apart from that, amazing service, thank you.

For example: http://0x0.st/illA.bin If I open in firefox it just downloads it, when I'd much prefer being able to preview it. Apart from that, amazing service, thank you.

Whether or not Firefox displays a file as plain text depends on the MIME type, not the extension. For this URL: < content-type: text/x-shellscript; charset=utf-8

This is correct, so complain to Firefox’ devs. Here’s your issue:
https://bugzilla.mozilla.org/show_bug.cgi?id=57342

If you need to set a MIME type manually with curl, just append ;type=text/plain to the file name. 0x0 will prefer user-specified types.

Whether or not Firefox displays a file as plain text depends on the MIME type, not the extension. For this URL: `< content-type: text/x-shellscript; charset=utf-8` This is correct, so complain to Firefox’ devs. Here’s your issue: https://bugzilla.mozilla.org/show_bug.cgi?id=57342 If you need to set a MIME type manually with curl, just append `;type=text/plain` to the file name. 0x0 will prefer user-specified types.
6gk commented 2020-09-26 06:39:27 +02:00 (Migrated from github.com)

Oh.

I didn't search the source code for x-shellscript which is what the file is when I run file -ib on it, but I saw x-ocletstream which is binary and appears to be the fallback, so I assumed it used that, which firefox would be correct not to display the raw of.

Thank you, I should have investigated just a tiny bit further.

Oh. I didn't search the source code for x-shellscript which is what the file is when I run `file -ib` on it, but I saw `x-ocletstream` which is binary and appears to be the fallback, so I assumed it used that, which firefox would be correct not to display the raw of. Thank you, I should have investigated *just a tiny bit* further.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mia/0x0#27
No description provided.