diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2021-01-17 15:28:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-17 16:28:54 +0100 |
commit | 7db0605d456559f1ca9447e6fa778559fe50cc95 (patch) | |
tree | 8607446306b6e526dab149a465cac3e3d825b96b /cli/flags.rs | |
parent | f4dbb267c6672f92605bc204b10ad9a96d160ef4 (diff) |
fix(op_crates/web): Use WorkerLocation for location in workers (#9084)
Diffstat (limited to 'cli/flags.rs')
-rw-r--r-- | cli/flags.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cli/flags.rs b/cli/flags.rs index a994b3f0c..9fe25df50 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -1437,7 +1437,10 @@ fn location_arg<'a, 'b>() -> Arg<'a, 'b> { if url.is_err() { return Err("Failed to parse URL".to_string()); } - if !["http", "https"].contains(&url.unwrap().scheme()) { + let mut url = url.unwrap(); + url.set_username("").unwrap(); + url.set_password(None).unwrap(); + if !["http", "https"].contains(&url.scheme()) { return Err("Expected protocol \"http\" or \"https\"".to_string()); } Ok(()) |