Fix url encoding query and implement FromQueryArgument for Option<T> (#4213)
* Fix url encoding queries * handle percent encoding hash fragments * implement fromqueryargument for Option<T> * fix tests * fix typo
This commit is contained in:
1 parent
662cf0d902
commit
9b16cbf254
13 files changed
+294
-30
No files matched your search
@@ -18,7 +18,8 @@ pub fn serve_asset_from_raw_path(path: &str) -> Result<Response<Vec<u8>>, AssetS
|
||||
// If the user provided a custom asset handler, then call it and return the response if the request was handled.
|
||||
// The path is the first part of the URI, so we need to trim the leading slash.
|
||||
let mut uri_path = PathBuf::from(
|
||||
urlencoding::decode(path)
|
||||
percent_encoding::percent_decode_str(path)
|
||||
.decode_utf8()
|
||||
.expect("expected URL to be UTF-8 encoded")
|
||||
.as_ref(),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user