-
Notifications
You must be signed in to change notification settings - Fork 216
migrate the main rustdoc handlers to axum, drop iron #1963
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
Conversation
4820a1b to
68229b0
Compare
68229b0 to
149b484
Compare
42348a7 to
9a59fd3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is awesome ❤️ lots of small comments, but no blockers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting the changes in behavior before the conversations get resolved:
- double slashes are now a 404 instead of a redirect (e.g. docs.rs//tokio)
- a couple handlers that special cased JS over other files have been removed
- we are going to lose timings from some of the database routes until we switch the codebase to async
I think it is somewhat likely this will introduce a regression by accident, but we can fix it after the fact, I expect it will be something small like the // routes actually being used.
Thank you for your work on this ❤️❤️❤️
|
Small correction : the double slash correction previously only handled double slashes at the end |
5afcad1 to
44334aa
Compare
So, I couldn't make out a sensible intermediate step due to the overlapping routes between the rustdoc-redirector and -html-handler.
So this is all the rest of the handlers, and is dropping iron.
Some things to keep in mind:
LegacySharedResourceHandler, replaced with a piece inrustdoc_redirector_handlerwhich serves assets only from the root. From the answers in Docs built during 2018-{10-12} link to the wrong url for static resources #1181 I would say we close that one then..icohandling is migrated to a simple redirect to our global favicon, which is what I think was the intention in the originalico_handler(f3848a3 is the original commit)RenderingsTimeRecorderavailable inspawn_blockingwhen I call storage methods was difficult, so I disable measuring these steps for now, and will re-activate this when I migrate the storage to be async (which would be probably the next good step).fixes
net2crate has been deprecated; usesocket2instead #760, RUSTSEC-2020-0056: stdweb is unmaintained #1122, RUSTSEC-2021-0078: Lenienthyperheader parsing ofContent-Lengthcould allow request smuggling #1460, RUSTSEC-2021-0079: Integer overflow inhyper's parsing of theTransfer-Encodingheader leads to data loss #1459, RUSTSEC-2021-0144: traitobject is Unmaintained #1826, RUSTSEC-2019-0039: typemap is Unmaintained #1827)ulimit( see improved warning for ulimit -n 4096 needed #1758 ), needs testing.