urlmon/tests: Don't proceed with POST operation (that will fail) if we run out of memory.
This commit is contained in:
parent
d5fedcdab0
commit
c4f1adb7cc
|
@ -159,6 +159,7 @@ static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate2 *iface,
|
||||||
addl_headers = CoTaskMemAlloc(sizeof(wszHeaders));
|
addl_headers = CoTaskMemAlloc(sizeof(wszHeaders));
|
||||||
if (!addl_headers)
|
if (!addl_headers)
|
||||||
{
|
{
|
||||||
|
http_post_test = FALSE;
|
||||||
skip("Out of memory\n");
|
skip("Out of memory\n");
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
@ -504,18 +505,19 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface, DWORD *grfB
|
||||||
|
|
||||||
if (http_post_test)
|
if (http_post_test)
|
||||||
{
|
{
|
||||||
pbindinfo->dwBindVerb = BINDVERB_POST;
|
|
||||||
pbindinfo->stgmedData.tymed = TYMED_HGLOBAL;
|
|
||||||
/* Must be GMEM_FIXED, GMEM_MOVABLE does not work properly
|
/* Must be GMEM_FIXED, GMEM_MOVABLE does not work properly
|
||||||
* with urlmon on native (Win98 and WinXP) */
|
* with urlmon on native (Win98 and WinXP) */
|
||||||
pbindinfo->stgmedData.hGlobal = GlobalAlloc(GPTR, sizeof(szPostData));
|
pbindinfo->stgmedData.hGlobal = GlobalAlloc(GPTR, sizeof(szPostData));
|
||||||
if (!pbindinfo->stgmedData.hGlobal)
|
if (!pbindinfo->stgmedData.hGlobal)
|
||||||
{
|
{
|
||||||
|
http_post_test = FALSE;
|
||||||
skip("Out of memory\n");
|
skip("Out of memory\n");
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
lstrcpy((LPSTR)pbindinfo->stgmedData.hGlobal, szPostData);
|
lstrcpy((LPSTR)pbindinfo->stgmedData.hGlobal, szPostData);
|
||||||
pbindinfo->cbstgmedData = sizeof(szPostData)-1;
|
pbindinfo->cbstgmedData = sizeof(szPostData)-1;
|
||||||
|
pbindinfo->dwBindVerb = BINDVERB_POST;
|
||||||
|
pbindinfo->stgmedData.tymed = TYMED_HGLOBAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
Loading…
Reference in New Issue