Commit 6f046e0f authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winhttp: Return an error from winhttp_request_get_ResponseBody if the request is not sent.

parent d6c9c984
......@@ -3664,6 +3664,11 @@ static HRESULT WINAPI winhttp_request_get_ResponseBody(
if (!body) return E_INVALIDARG;
EnterCriticalSection( &request->cs );
if (request->state < REQUEST_STATE_SENT)
{
err = ERROR_WINHTTP_CANNOT_CALL_BEFORE_SEND;
goto done;
}
if (!(sa = SafeArrayCreateVector( VT_UI1, 0, request->offset )))
{
err = ERROR_OUTOFMEMORY;
......
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