File tree 1 file changed +2
-9
lines changed
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -496,19 +496,12 @@ pub(crate) async fn get_all_platforms(
496
496
Extension ( pool) : Extension < Pool > ,
497
497
uri : Uri ,
498
498
) -> AxumResult < AxumResponse > {
499
- // since we directly use the Uri-path and not the extracted params from the router,
500
- // we have to percent-decode the string here.
501
- let original_path = percent_encoding:: percent_decode ( uri. path ( ) . as_bytes ( ) )
502
- . decode_utf8 ( )
503
- . map_err ( |_| AxumNope :: BadRequest ) ?;
504
- let mut req_path: Vec < & str > = original_path. split ( '/' ) . collect ( ) ;
499
+ let req_path: String = params. path . unwrap_or_default ( ) ;
500
+ let req_path: Vec < & str > = req_path. split ( '/' ) . collect ( ) ;
505
501
506
502
let release_found = match_version_axum ( & pool, & params. name , Some ( & params. version ) ) . await ?;
507
503
trace ! ( ?release_found, "found release" ) ;
508
504
509
- // Remove the empty start, "releases", the name and the version from the path
510
- req_path. drain ( ..4 ) . for_each ( drop) ;
511
-
512
505
// Convenience function to allow for easy redirection
513
506
#[ instrument]
514
507
fn redirect (
You can’t perform that action at this time.
0 commit comments