mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +00:00
Ladybird: Default to HTTPS instead of HTTP if no protocol is specified
This commit is contained in:
parent
e2c72922f6
commit
1a1ff8eb5e
2 changed files with 2 additions and 2 deletions
|
@ -468,7 +468,7 @@ void Tab::focus_location_editor()
|
||||||
void Tab::navigate(QString url, LoadType load_type)
|
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))
|
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);
|
m_is_history_navigation = (load_type == LoadType::HistoryNavigation);
|
||||||
view().load(ak_deprecated_string_from_qstring(url));
|
view().load(ak_deprecated_string_from_qstring(url));
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
if (FileSystem::exists(raw_url))
|
if (FileSystem::exists(raw_url))
|
||||||
url = URL::create_with_file_scheme(TRY(FileSystem::real_path(raw_url)).to_deprecated_string());
|
url = URL::create_with_file_scheme(TRY(FileSystem::real_path(raw_url)).to_deprecated_string());
|
||||||
else if (!url.is_valid())
|
else if (!url.is_valid())
|
||||||
url = DeprecatedString::formatted("http://{}", raw_url);
|
url = DeprecatedString::formatted("https://{}", raw_url);
|
||||||
return url;
|
return url;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue