wininet: Use proc instead of enum in HTTPSENDREQUESTW request.
This commit is contained in:
parent
e30037f0d5
commit
c156845560
|
@ -180,6 +180,20 @@ static void HTTP_FreeTokens(LPWSTR * token_array)
|
|||
* Helper functions for the HttpSendRequest(Ex) functions
|
||||
*
|
||||
*/
|
||||
static void AsyncHttpSendRequestProc(WORKREQUEST *workRequest)
|
||||
{
|
||||
struct WORKREQ_HTTPSENDREQUESTW const *req = &workRequest->u.HttpSendRequestW;
|
||||
LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) workRequest->hdr;
|
||||
|
||||
TRACE("%p\n", lpwhr);
|
||||
|
||||
HTTP_HttpSendRequestW(lpwhr, req->lpszHeader,
|
||||
req->dwHeaderLength, req->lpOptional, req->dwOptionalLength,
|
||||
req->dwContentLength, req->bEndRequest);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, req->lpszHeader);
|
||||
}
|
||||
|
||||
static void HTTP_FixVerb( LPWININETHTTPREQW lpwhr )
|
||||
{
|
||||
/* if the verb is NULL default to GET */
|
||||
|
@ -1778,7 +1792,8 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
|
|||
WORKREQUEST workRequest;
|
||||
struct WORKREQ_HTTPSENDREQUESTW *req;
|
||||
|
||||
workRequest.asyncall = HTTPSENDREQUESTW;
|
||||
workRequest.asyncall = CALLASYNCPROC;
|
||||
workRequest.asyncproc = AsyncHttpSendRequestProc;
|
||||
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
|
||||
req = &workRequest.u.HttpSendRequestW;
|
||||
if (lpBuffersIn)
|
||||
|
@ -1873,8 +1888,9 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
|
|||
WORKREQUEST workRequest;
|
||||
struct WORKREQ_HTTPSENDREQUESTW *req;
|
||||
|
||||
workRequest.asyncall = HTTPSENDREQUESTW;
|
||||
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
|
||||
workRequest.asyncall = CALLASYNCPROC;
|
||||
workRequest.asyncproc = AsyncHttpSendRequestProc;
|
||||
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
|
||||
req = &workRequest.u.HttpSendRequestW;
|
||||
if (lpszHeaders)
|
||||
req->lpszHeader = WININET_strdupW(lpszHeaders);
|
||||
|
@ -2351,7 +2367,6 @@ lend:
|
|||
return bSuccess;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* HTTP_Connect (internal)
|
||||
*
|
||||
|
|
|
@ -3363,21 +3363,6 @@ static VOID INTERNET_ExecuteWork(void)
|
|||
}
|
||||
break;
|
||||
|
||||
case HTTPSENDREQUESTW:
|
||||
{
|
||||
struct WORKREQ_HTTPSENDREQUESTW *req = &workRequest.u.HttpSendRequestW;
|
||||
LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) workRequest.hdr;
|
||||
|
||||
TRACE("HTTPSENDREQUESTW %p\n", lpwhr);
|
||||
|
||||
HTTP_HttpSendRequestW(lpwhr, req->lpszHeader,
|
||||
req->dwHeaderLength, req->lpOptional, req->dwOptionalLength,
|
||||
req->dwContentLength, req->bEndRequest);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, req->lpszHeader);
|
||||
}
|
||||
break;
|
||||
|
||||
case HTTPOPENREQUESTW:
|
||||
{
|
||||
struct WORKREQ_HTTPOPENREQUESTW *req = &workRequest.u.HttpOpenRequestW;
|
||||
|
|
|
@ -261,7 +261,6 @@ typedef enum
|
|||
FTPREMOVEDIRECTORYW,
|
||||
FTPRENAMEFILEW,
|
||||
FTPFINDNEXTW,
|
||||
HTTPSENDREQUESTW,
|
||||
HTTPOPENREQUESTW,
|
||||
INTERNETOPENURLW,
|
||||
INTERNETREADFILEEXA,
|
||||
|
|
Loading…
Reference in New Issue