-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
Correct mime-types for atom, rdf, and rss #50
Conversation
This solves some issues with nosniff header also. atom: application/atom+xml (https://www.iana.org/assignments/media-types/media-types.xhtml) rdf: application/rdf+xml (http://www.w3.org/2008/01/rdf-media-types) rss: application/rss+xml (http://www.rssboard.org/rss-mime-type-application.txt)
Seems like tests are failing? Could you take a look? |
Of course I could fix the tests... |
Seems appropriate - but I can't merge it with failing tests =). |
@AD7six Found some time to fix tests. |
@gennadiylitvinyuk Thanks for the pull request, however, the media types were intentionally set to |
Hi @alrra, I am a witness to a opposite function, compared to the described in h5bp/html5-boilerplate#989. With So we should either set the nosniff-header and define mime-types correctly, or don't set it, and let browsers interpret it from |
@gennadiylitvinyuk Sorry for the delay on this.
@gennadiylitvinyuk I could not reproduce that using the configurations that currently exist in this repository. In my tests, the files where display as intended in all versions of Internet Explorer.
|
Hi @alrra You has obviously shown the unintended behavior. The IE will download any resource, if it does not know how to process it, and Please see: http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx If you set plain/text with nosniff to a html file, you will see/download source code of the file (since IE8) but you will not get it interpreted as a HTML. The same is with images served as binary... The changes were intended to let IE interpret file types it could, and show them correctly with provided processors, for example interpret rss/atom feed and show them correctly (see IE7 screenshots, it simply ignores nosniff, ie8+ does not interpret them anymore) |
@gennadiylitvinyuk I don’t understand what you’re getting at. @alrra’s screenshots show that IE knows how to process the files with the current MIME types. Why would displaying the feed in the browser be the unintended behavior? |
From the looks of it, I believe what @gennadiylitvinyuk means is that when IE loads an RSS feed it tries to sniff the content so it's RSS previewer kicks in and The tests from h5bp/html5-boilerplate#989 were not done in Windows as the tester did not have them on hand at the time but @alrra has done them now with the nosniff header in place. And IE7 seems to wrongly ignore the header and parses the page in it's native RSS viewer. Where as the others do what they're told? So is this the desired effect? For example IE11 loads an RSS feed like https://developer.apple.com/news/rss/news.rss and renders it something like below but with the nosniff header IE just displays the raw source. FWIW apple.com was sending Seems like the mime type has to be in the style of |
@hatzopoulos Thank you for your comment!
@gennadiylitvinyuk In the future please try to be more clear (e.g.: I also interpreted "IE will download" as IE will open the download prompt). I did some more tests (see below), and it seems that it is in general ok to change the media types for Note: After this change, the only minor issue will be that IE 6 users will get the download prompt for |
Modify the configurations so that: * `.atom` files are served with the `application/atom+xml`¹ media type * `.rss` files are served with the `application/rss+xml`² media type - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ¹ https://www.iana.org/assignments/media-types/application/atom+xml ² http://tools.ietf.org/id/draft-nottingham-rss-media-type-00.txt Ref: h5bp/server-configs-apache#50 (comment) h5bp/server-configs-apache@653c461 Close #90
This solves some issues with nosniff header also.
atom: application/atom+xml (https://www.iana.org/assignments/media-types/media-types.xhtml)
rdf: application/rdf+xml (http://www.w3.org/2008/01/rdf-media-types)
rss: application/rss+xml (http://www.rssboard.org/rss-mime-type-application.txt)