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