mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
Fix --proxy option parsing
This commit is contained in:
parent
db3214bffa
commit
20c282e3e8
@ -142,7 +142,7 @@ bool NaiveConfig::Parse(const base::Value::Dict& value) {
|
|||||||
remove_auth.ClearPassword();
|
remove_auth.ClearPassword();
|
||||||
GURL url_no_auth = url.ReplaceComponents(remove_auth);
|
GURL url_no_auth = url.ReplaceComponents(remove_auth);
|
||||||
std::string proxy_uri = url_no_auth.GetWithEmptyPath().spec();
|
std::string proxy_uri = url_no_auth.GetWithEmptyPath().spec();
|
||||||
if (proxy_uri.back() == '/') {
|
if (!proxy_uri.empty() && proxy_uri.back() == '/') {
|
||||||
proxy_uri.pop_back();
|
proxy_uri.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user