fixed bug #1713562 - NSISdl doesn't finish download after content-length bytes
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5154 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
fcfe33c05b
commit
5e314f1c0f
1 changed files with 15 additions and 1 deletions
|
@ -469,7 +469,21 @@ __declspec(dllexport) void download (HWND parent,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (GetTickCount() > last_recv_time+timeout_ms)
|
if (GetTickCount() > last_recv_time+timeout_ms)
|
||||||
error = "Downloading timed out.";
|
{
|
||||||
|
if (sofar != cl)
|
||||||
|
{
|
||||||
|
error = "Downloading timed out.";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// workaround for bug #1713562
|
||||||
|
// buggy servers that wait for the client to close the connection.
|
||||||
|
// another solution would be manually stopping when cl == sofar,
|
||||||
|
// but then buggy servers that return wrong content-length will fail.
|
||||||
|
bSuccess = TRUE;
|
||||||
|
error = "success";
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (!data_downloaded)
|
else if (!data_downloaded)
|
||||||
Sleep(10);
|
Sleep(10);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue