From b16918ccb9c20cdaf8cae79699e401fba6ffe685 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Sat, 9 Apr 2022 15:48:55 +0430 Subject: 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. --- Userland/Utilities/pro.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Userland') diff --git a/Userland/Utilities/pro.cpp b/Userland/Utilities/pro.cpp index 123b1d11fe..93201b0f26 100644 --- a/Userland/Utilities/pro.cpp +++ b/Userland/Utilities/pro.cpp @@ -191,7 +191,9 @@ ErrorOr 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; -- cgit v1.2.3