From 1a1ff8eb5ee6a53a4963628c5e65f10ec3421114 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 23 May 2023 10:19:27 +0200 Subject: [PATCH] Ladybird: Default to HTTPS instead of HTTP if no protocol is specified --- Ladybird/Tab.cpp | 2 +- Ladybird/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Ladybird/Tab.cpp b/Ladybird/Tab.cpp index c2e9592e49..98168a46de 100644 --- a/Ladybird/Tab.cpp +++ b/Ladybird/Tab.cpp @@ -468,7 +468,7 @@ void Tab::focus_location_editor() void Tab::navigate(QString url, LoadType load_type) { if (!url.startsWith("http://", Qt::CaseInsensitive) && !url.startsWith("https://", Qt::CaseInsensitive) && !url.startsWith("file://", Qt::CaseInsensitive) && !url.startsWith("about:", Qt::CaseInsensitive)) - url = "http://" + url; + url = "https://" + url; m_is_history_navigation = (load_type == LoadType::HistoryNavigation); view().load(ak_deprecated_string_from_qstring(url)); } diff --git a/Ladybird/main.cpp b/Ladybird/main.cpp index 0c1bb0a4e9..739e631df8 100644 --- a/Ladybird/main.cpp +++ b/Ladybird/main.cpp @@ -84,7 +84,7 @@ ErrorOr serenity_main(Main::Arguments arguments) if (FileSystem::exists(raw_url)) url = URL::create_with_file_scheme(TRY(FileSystem::real_path(raw_url)).to_deprecated_string()); else if (!url.is_valid()) - url = DeprecatedString::formatted("http://{}", raw_url); + url = DeprecatedString::formatted("https://{}", raw_url); return url; };