Open Mathnerd314 opened 5 years ago
If you'd like to not see a dialog when the type is empty, choose the "Open with" option and then "remember choice". If you do encounter a file that you want to be downloaded anyway, then you can use "Tools" menu > "Open in Browser" > "Enable for next request" to force the dialog to appear anyway, despite the default choice.
Not ideal, but the alternative (implementing MIME sniffing) is more complicated.
(this is the same "bug" as #32)
One could try extracting the servo MIME sniffer into a separate crate and compile it to wasm.
The problem is not the sniffing logic itself, but the ability to use the response body twice: once to sniff, and once more to stream the original response. There is currently no side-effect free way of performing content sniffing AND changing the content type. #5 has more details on my last attempt.
This article seems to have an empty content type header: http://kyleprifogle.com/dear-startup/. Open in Browser pops up a dialog for it.
I guess this is solved by implementing content sniffing as in #5? Or is there an easier solution?