-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do content-sniffing for HTML #566
Comments
Fixing this would mean changing |
I'd argue that it would make sense to view every file specified on the command line, as it should be much easier to implement and user must be knowing what is he doing when he does this. In fact, he won't ever want to "download" a local file. |
// in fact i'm upset that mutt can't view html in qutebrowser because it doesn't append ".html" to the temporary file's name |
Fair enough - though it still would need to set some kind of mimetype for them, and I'm not sure if it's a good idea to set As a workaround, I think you can write a wrapper script which renames the file and launches qutebrowser on it, and then launch that from mutt. |
I wouldn't do this. I would always look at the Content-Type response header because this is the correct way to do things. |
I don't think local files have HTTP headers 😉 |
Looks like qutebrowser does the right thing with QtWebEngine here, and I don't want to implement that for QtWebKit only. |
Another reason to not do this: Chromium disabled mime sniffing for local files (without .html extension) for security reasons: https://bugs.chromium.org/p/chromium/issues/detail?id=777737 |
When opening a local HTML file without
.html
extension, qutebrowser downloads the file instead of opening it.Instead we should detect it's HTML and open it accordingly.
Ressources:
The text was updated successfully, but these errors were encountered: