diff --git a/Contrib/NSISdl/nsisdl.cpp b/Contrib/NSISdl/nsisdl.cpp index 533aba0e..37348f94 100644 --- a/Contrib/NSISdl/nsisdl.cpp +++ b/Contrib/NSISdl/nsisdl.cpp @@ -469,7 +469,21 @@ __declspec(dllexport) void download (HWND parent, } } 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) Sleep(10);