pro: Only attempt to parse a proxy url if it is provided
Otherwise we'd end up trying to parse an empty string as a proxy url which is certainly not one.
This commit is contained in:
parent
a42e03b01a
commit
b16918ccb9
Notes:
sideshowbarker
2024-07-17 14:14:47 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/b16918ccb9 Pull-request: https://github.com/SerenityOS/serenity/pull/13586
1 changed files with 3 additions and 1 deletions
|
@ -191,7 +191,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return 1;
|
||||
}
|
||||
|
||||
Core::ProxyData proxy_data = TRY(Core::ProxyData::parse_url(proxy_spec));
|
||||
Core::ProxyData proxy_data {};
|
||||
if (!proxy_spec.is_empty())
|
||||
proxy_data = TRY(Core::ProxyData::parse_url(proxy_spec));
|
||||
|
||||
Core::EventLoop loop;
|
||||
bool received_actual_headers = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue