Skip to content

Commit b18c9e2

Browse files
committed
Bug 2000708 - Do not include the scheme or hostname in the path used to download the stub installer. r=cdupuis
Differential Revision: https://phabricator.services.mozilla.com/D272948
1 parent 1f5159b commit b18c9e2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

browser/app/desktop-launcher/download_firefox.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ std::optional<std::wstring> get_object_name() {
8686
static_assert(false);
8787
#endif
8888

89-
return L"https://download.mozilla.org/?os=" + arch.value() + L"&lang=" +
90-
lang + L"&product=" + product;
89+
return L"?os=" + arch.value() + L"&lang=" + lang + L"&product=" + product;
9190
}
9291

9392
/**

browser/app/desktop-launcher/tests/gtest/DesktopLauncherTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ TEST_F(DesktopLauncherTest, TempFileNameTest) {
9696
TEST_F(DesktopLauncherTest, TestGetObjectName) {
9797
std::optional<std::wstring> objectName = get_object_name();
9898
ASSERT_TRUE(objectName.has_value());
99-
ASSERT_NE(std::wstring::npos,
99+
// The object name is a path, not a URL.
100+
ASSERT_EQ(std::wstring::npos,
100101
objectName.value().find(L"https://download.mozilla.org/"));
101102
ASSERT_NE(std::wstring::npos, objectName.value().find(L"lang="));
102103
ASSERT_NE(std::wstring::npos, objectName.value().find(L"product="));

0 commit comments

Comments
 (0)