mirror of https://github.com/fafhrd91/actix-web
comment
This commit is contained in:
parent
6dacc34286
commit
6f40b60bd4
|
@ -29,6 +29,8 @@ impl PathBufWrap {
|
|||
// equivalent to `path.split('/').count()`
|
||||
let mut segment_count = path.matches('/').count() + 1;
|
||||
|
||||
// we can decode the whole path here (instead of per-segment decoding)
|
||||
// because we will reject `%2F` in paths using `segement_count`.
|
||||
let path = percent_encoding::percent_decode_str(path)
|
||||
.decode_utf8()
|
||||
.map_err(|_| UriSegmentError::NotValidUtf8)?;
|
||||
|
|
Loading…
Reference in New Issue