HTTPDownloader: Remove unused default user agent

This commit is contained in:
Stenzek
2025-11-29 16:08:42 +10:00
parent a1162731a0
commit fe8b8f04a7
2 changed files with 1 additions and 6 deletions

View File

@@ -14,9 +14,6 @@ LOG_CHANNEL(HTTPDownloader);
static constexpr float DEFAULT_TIMEOUT_IN_SECONDS = 30;
static constexpr u32 DEFAULT_MAX_ACTIVE_REQUESTS = 4;
const char HTTPDownloader::DEFAULT_USER_AGENT[] =
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0";
HTTPDownloader::HTTPDownloader()
: m_timeout(DEFAULT_TIMEOUT_IN_SECONDS), m_max_active_requests(DEFAULT_MAX_ACTIVE_REQUESTS)
{

View File

@@ -67,7 +67,7 @@ public:
HTTPDownloader();
virtual ~HTTPDownloader();
static std::unique_ptr<HTTPDownloader> Create(std::string user_agent = DEFAULT_USER_AGENT, Error* error = nullptr);
static std::unique_ptr<HTTPDownloader> Create(std::string user_agent, Error* error = nullptr);
static std::string GetExtensionForContentType(const std::string& content_type);
void SetTimeout(float timeout);
@@ -81,8 +81,6 @@ public:
void WaitForAllRequestsWithYield(std::function<void()> before_sleep_cb, std::function<void()> after_sleep_cb);
bool HasAnyRequests();
static const char DEFAULT_USER_AGENT[];
protected:
virtual Request* InternalCreateRequest() = 0;