diff options
-rw-r--r-- | src/proxy_config.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/proxy_config.rs b/src/proxy_config.rs index 29493b2..009ca07 100644 --- a/src/proxy_config.rs +++ b/src/proxy_config.rs @@ -98,8 +98,11 @@ fn parse_tricot_tag( return None; } - let (host, path_prefix) = match splits[1].split_once('/') { - Some((h, p)) => (h, Some(format!("/{}", p))), + let (host, path_prefix) = match splits[1].find('/') { + Some(i) => { + let (host, pp) = splits[1].split_at(i); + (host, Some(pp.to_string())) + }, None => (splits[1], None), }; |