-
Notifications
You must be signed in to change notification settings - Fork 214
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
Website: 'NEWS' tab causes download #10
Comments
Well, that stinks. The same thing happens with the LGPL license, and also on other browsers besides Chrome. According to this: http://stackoverflow.com/questions/15951012/can-mime-types-of-github-pages-files-be-configured it seems that GitHub is unable to determine the mimetype of the files because they do not have an extension, and fall back to application/octet-stream. I attempted to set the target of the link to open in a new browser tab, hoping that this would convince a browser to not download the file. http://www.w3schools.com/tags/att_a_target.asp However, the browser still downloaded the file. Example here: http://brarcher.github.io/check/ Without adding the extension of these files, I'm not sure of a way to resolve this, as the issue is on GitHub's side. |
I believe there is a way. You can create a https://github.com/git/git/blob/master/Documentation/gitattributes.txt I should note that I spent quite a bit of time trying to use the That's a long way of saying, your mileage may vary. |
As the related issue documents, GitHub pages cannot determine the file type of the NEWS or LGPL files because they do not have a file extension, so the server uses a default MIME type of application/octet-stream, which triggers a download, rather than letting the user actually read the file. To circumvent this problem, I changed to file links from relative links to full hyperlinks referencing the GitHub repository URL instead. The NEWS file is now viewable via the "raw" view option accessible through GitHub, and the LGPL file links to the GitHub license file default. I chose not to simply use the raw view for the license file since I felt most people looking at that file would probably not be lawyers, and would therefore benefit from the summary GitHub displays at the top of the page. This pull request fixes issue libcheck#10
…ab-causes-download Fix GitHub Pages Site Download Bug #10
When I click on the 'NEWS' tab on the check website, in Chrome on Mac OS X, it causes it to download the file instead of viewing it.
Fetching the page with curl shows that the MIME type is 'application/octet-stream'.
The text was updated successfully, but these errors were encountered: