Commit b8e2edf1 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

cryptnet: Don't ignore HttpEndRequestW error in HTTP_RetrieveEncodedObjectW.

parent 437df58d
......@@ -941,19 +941,15 @@ static BOOL WINAPI HTTP_RetrieveEncodedObjectW(LPCWSTR pszURL,
else
ret = TRUE;
}
/* We don't set ret to TRUE in this block to avoid masking
* an error from HttpSendRequestExW.
*/
if (ret &&
!HttpEndRequestW(hHttp, NULL, 0, (DWORD_PTR)context) &&
!(ret = HttpEndRequestW(hHttp, NULL, 0, (DWORD_PTR)context)) &&
GetLastError() == ERROR_IO_PENDING)
{
if (WaitForSingleObject(context->event,
context->timeout) == WAIT_TIMEOUT)
{
SetLastError(ERROR_TIMEOUT);
ret = FALSE;
}
else
ret = TRUE;
}
if (ret)
ret = CRYPT_DownloadObject(dwRetrievalFlags, hHttp,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment