paths no longer case sensitive
This commit is contained in:
parent
040a16b929
commit
5affebf793
1 changed files with 3 additions and 3 deletions
|
|
@ -46,7 +46,7 @@ impl Directive {
|
|||
discrim_ip: IpAddr,
|
||||
transformed_ua: &str,
|
||||
) -> bool {
|
||||
let path_in = connection.path.trim_matches('/');
|
||||
let path_in = connection.path.trim_matches('/').to_lowercase();
|
||||
let mut ret = false;
|
||||
|
||||
let mut visited_paths = self.visited_paths.lock().unwrap();
|
||||
|
|
@ -60,11 +60,11 @@ impl Directive {
|
|||
}
|
||||
|
||||
let mut visited_paths = self.get_checker_data(&id, &mut visited_paths);
|
||||
if self.cached && visited_paths.contains(&connection.path) {
|
||||
if self.cached && visited_paths.contains(&path_in) {
|
||||
return false;
|
||||
}
|
||||
let path_segments_in: Vec<_> = path_in.split("/").collect();
|
||||
for path in self.paths.iter() {
|
||||
for path in self.paths.iter().map(|x| x.to_lowercase()) {
|
||||
let mut path_segments: Vec<&str> = path.split("/").collect();
|
||||
if path_segments.len() != path_segments_in.len() {
|
||||
if path.ends_with("**") && path_segments.len() < path_segments_in.len() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue