mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 08:41:00 +00:00
fix issues from review
Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
committed by
qdequele
parent
305665cd42
commit
b96da94f92
@ -2,6 +2,7 @@
|
||||
/// This middleware normalizes slashes in paths
|
||||
/// * consecutive instances of `/` get collapsed into one `/`
|
||||
/// * any ending `/` is removed.
|
||||
/// Original source from: https://gitlab.com/snippets/1884466
|
||||
///
|
||||
/// Ex:
|
||||
/// /this///url/
|
||||
@ -69,7 +70,7 @@ where
|
||||
|
||||
let path = match parts.path_and_query.as_ref().map(|pq| pq.query()).flatten() {
|
||||
Some(q) => bytes::Bytes::from(format!("{}?{}", new_path, q)),
|
||||
None =>bytes::Bytes::from(format!("{}", new_path))
|
||||
None => bytes::Bytes::from(new_path.to_string()),
|
||||
};
|
||||
|
||||
if let Ok(pq) = PathAndQuery::from_maybe_shared(path) {
|
||||
|
Reference in New Issue
Block a user