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
Don't interpret binary files as HTML #7706
Comments
Rather than a black list with |
is it possible a n00b like me can fix it |
@s142857 I think you should give it a shot :) |
could you guide me @jdm |
First step is to find the |
Fixed by #7956. |
We want to avoid interpreting streams of binary bytes as HTML, since that's silly and easily breaks our layout code that is unprepared for such things. In the code that receives the HTTP headers for a page (ParserContext::headers_available) we should check for the
Content-Type
headerapplication/octet-stream
and ignore the forthcoming response body if the header matches. We can replace it with an informative message in the same way that we create a special document for images in that method.Testcase: firefox.com and press the download button
Code: components/script/dom/servohtmlparser.rs
The text was updated successfully, but these errors were encountered: