Hans Leidekker : winhttp: Return an error from winhttp_request_get_ResponseBody if the request is not sent.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Feb 16 10:01:21 CST 2015
Module: wine
Branch: master
Commit: 6f046e0f518ea19b510ed14463a484aaa485050c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6f046e0f518ea19b510ed14463a484aaa485050c
Author: Hans Leidekker <hans at codeweavers.com>
Date: Mon Feb 16 14:41:10 2015 +0100
winhttp: Return an error from winhttp_request_get_ResponseBody if the request is not sent.
---
dlls/winhttp/request.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index 2932108..135a291 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -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;
More information about the wine-cvs
mailing list