{"action":"created","issue":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/566","labels_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/566/labels{/name}","comments_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/566/comments","events_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/566/events","html_url":"https://github.com/The-Compiler/qutebrowser/issues/566","id":62681548,"number":566,"title":"Do content-sniffing for HTML","user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/priority:%202%20-%20low","name":"priority: 2 - low","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-18T12:25:36Z","updated_at":"2015-10-22T13:00:32Z","closed_at":null,"body":"When opening a local HTML file without `.html` extension, qutebrowser downloads the file instead of opening it.\r\n\r\nInstead we should detect it's HTML and open it accordingly.\r\n\r\nRessources:\r\n\r\n* [WhatWG MIME Sniffing Standard](https://mimesniff.spec.whatwg.org/#tag-terminating-byte)\r\n* [Arora's implementation](https://github.com/Arora/arora/blob/master/src/webpage.cpp#L354-L375)\r\n* [Eric's implementation](http://die-offenbachs.homelinux.org:48888/hg/eric/file/f9e3b6472b44/Helpviewer/HelpBrowserWV.py#l2480)\r\n"},"comment":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/comments/150212077","html_url":"https://github.com/The-Compiler/qutebrowser/issues/566#issuecomment-150212077","issue_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/566","id":150212077,"user":{"login":"l29ah","id":31852,"avatar_url":"https://avatars.githubusercontent.com/u/31852?v=3","gravatar_id":"","url":"https://api.github.com/users/l29ah","html_url":"https://github.com/l29ah","followers_url":"https://api.github.com/users/l29ah/followers","following_url":"https://api.github.com/users/l29ah/following{/other_user}","gists_url":"https://api.github.com/users/l29ah/gists{/gist_id}","starred_url":"https://api.github.com/users/l29ah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l29ah/subscriptions","organizations_url":"https://api.github.com/users/l29ah/orgs","repos_url":"https://api.github.com/users/l29ah/repos","events_url":"https://api.github.com/users/l29ah/events{/privacy}","received_events_url":"https://api.github.com/users/l29ah/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T13:00:32Z","updated_at":"2015-10-22T13:00:32Z","body":"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."}}