Some shell scripts are given the .bin extension and therefore cannot be opened in firefox #27
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: mia/0x0#27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.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 sawx-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.