diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 10fa8a5997f..c8a9608a366 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -3168,9 +3168,6 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, assert(lpwhr->hdr.htype == WH_HHTTPREQ); - /* Clear any error information */ - INTERNET_SetLastError(0); - /* if the verb is NULL default to GET */ if (!lpwhr->lpszVerb) lpwhr->lpszVerb = WININET_strdupW(szGET); @@ -3412,6 +3409,7 @@ lend: sizeof(INTERNET_ASYNC_RESULT)); TRACE("<--\n"); + if (bSuccess) INTERNET_SetLastError(ERROR_SUCCESS); return bSuccess; }