-
Notifications
You must be signed in to change notification settings - Fork 203
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
Remove database_file_handler
; give precendence to router error messages
#1326
Conversation
When serving 'essential files', we can either serve the global one, created when building `empty_library`, or the local one, created when building the local crate. Currently we default to the global one, but this causes issues when the file should never have been global in the first place (such as recently for `crates.js`: see rust-lang#1313). This gives precedence to the local file so that the bug will be fixed when rustdoc fixes it, even if we forget to update `ESSENTIAL_FILES_UNVERSIONED`.
…ages The database handler was unused; the router already serves the favicon and it doesn't do anything else. Note that 'database handler' is different from 'files served from storage', the router already handles those. This also fixes the long standing bug that all 404 errors are either 'crate not found' or 'resource not found'.
According to the |
@Nemo157 it's serving pages like |
It also lets you have programmatic access to the build-logs and sources (e.g. https://docs.rs/build-logs/334832/x86_64-unknown-linux-gnu.txt and https://docs.rs/sources/regex/1.4.5/CHANGELOG.md), but I don't think we should keep it around just for that. If we think build logs are useful they should be part of the router, not a completely separate handler. Serving sources directly seems like a misfeature, people should use crates.io tarballs for that. |
But how are people discovering those URLs and going to them in production? Maybe the easiest way to see if removing this breaks someone's workflow is just to merge it and see who complains 😁 |
The database handler was unused; the router already serves the favicon and it
doesn't do anything else. Note that 'database handler' is different
from 'files served from storage', the router already handles those.
This also fixes the long standing bug that all 404 errors are either
'crate not found' or 'resource not found'.
Closes #55. This builds on #1324.