HTTPDownloader: Pass content type by reference

This commit is contained in:
Connor McLaughlin
2022-10-01 00:00:02 +01:00
committed by refractionpcsx2
parent 99fbe4e9ff
commit 9c64193434
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -259,7 +259,7 @@ bool HTTPDownloaderWinHttp::StartRequest(HTTPDownloader::Request* request)
if (!WinHttpCrackUrl(url_wide.c_str(), static_cast<DWORD>(url_wide.size()), 0, &uc))
{
Console.Error("WinHttpCrackUrl() failed: %u", GetLastError());
req->callback(-1, std::string(), Request::Data());
req->callback(-1, req->content_type, Request::Data());
delete req;
return false;
}
@@ -271,7 +271,7 @@ bool HTTPDownloaderWinHttp::StartRequest(HTTPDownloader::Request* request)
if (!req->hConnection)
{
Console.Error("Failed to start HTTP request for '%s': %u", req->url.c_str(), GetLastError());
req->callback(-1, std::string(), Request::Data());
req->callback(-1, req->content_type, Request::Data());
delete req;
return false;
}