NOISSUE fix bad redirect URLs provided by the curse CDN
MultiMC now parses the HTTP Location header in a (more) tolerant mode.
This commit is contained in:
parent
0942867ecc
commit
c33b4e252f
4 changed files with 50 additions and 4 deletions
|
@ -48,7 +48,13 @@ void Flame::FileResolvingTask::netJobFinished()
|
|||
continue;
|
||||
}
|
||||
out.fileName = Json::requireString(obj, "FileNameOnDisk");
|
||||
out.url = Json::requireString(obj, "DownloadURL");
|
||||
auto urlString = Json::requireString(obj, "DownloadURL");
|
||||
urlString.replace(' ', "%20");
|
||||
out.url = QUrl(urlString, QUrl::StrictMode);
|
||||
if(!out.url.isValid())
|
||||
{
|
||||
throw "Perkele!";
|
||||
}
|
||||
// This is a piece of a Flame project JSON pulled out into the file metadata (here) for convenience
|
||||
// It is also optional
|
||||
QJsonObject projObj = Json::ensureObject(obj, "_Project", {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue