File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1700,7 +1700,10 @@ mod tests {
17001700
17011701 #[ test]
17021702 fn test_item_with_semver_url ( ) {
1703- // https://github.com/rust-lang/docs.rs/iss
1703+ // https://github.com/rust-lang/docs.rs/issues/3036
1704+ // This fixes an issue where we mistakenly attached a
1705+ // trailing `/` to a rustdoc URL when redirecting
1706+ // to the exact version, coming from a semver version.
17041707
17051708 let ver: Version = "0.14.0" . parse ( ) . unwrap ( ) ;
17061709 let params = RustdocParams :: new ( KRATE )
Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ pub(crate) async fn rustdoc_html_server_handler(
474474 } ) ?
475475 . into_canonical_req_version_or_else ( |version| {
476476 AxumNope :: Redirect (
477- dbg ! ( params. clone( ) . with_req_version( version) ) . rustdoc_url ( ) ,
477+ params. clone ( ) . with_req_version ( version) . rustdoc_url ( ) ,
478478 CachePolicy :: ForeverInCdn ,
479479 )
480480 } ) ?;
@@ -3468,7 +3468,9 @@ mod test {
34683468 #[ tokio:: test( flavor = "multi_thread" ) ]
34693469 async fn test_fetch_item_with_semver_url ( ) -> Result < ( ) > {
34703470 // https://github.com/rust-lang/docs.rs/issues/3036
3471-
3471+ // This fixes an issue where we mistakenly attached a
3472+ // trailing `/` to a rustdoc URL when redirecting
3473+ // to the exact version, coming from a semver version.
34723474 let env = TestEnvironment :: new ( ) . await ?;
34733475
34743476 env. fake_release ( )
You can’t perform that action at this time.
0 commit comments