Skip to content
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

Empty content type shows dialog #61

Open
Mathnerd314 opened this issue Sep 25, 2019 · 3 comments
Open

Empty content type shows dialog #61

Mathnerd314 opened this issue Sep 25, 2019 · 3 comments

Comments

@Mathnerd314
Copy link
Contributor

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?

@Rob--W
Copy link
Owner

Rob--W commented Sep 26, 2019

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)

@est31
Copy link
Collaborator

est31 commented Oct 10, 2020

One could try extracting the servo MIME sniffer into a separate crate and compile it to wasm.

@Rob--W
Copy link
Owner

Rob--W commented Oct 10, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants