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
|
* 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 )
|
static void HTTP_FixVerb( LPWININETHTTPREQW lpwhr )
|
||||||
{
|
{
|
||||||
/* if the verb is NULL default to GET */
|
/* if the verb is NULL default to GET */
|
||||||
|
@ -1778,7 +1792,8 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
|
||||||
WORKREQUEST workRequest;
|
WORKREQUEST workRequest;
|
||||||
struct WORKREQ_HTTPSENDREQUESTW *req;
|
struct WORKREQ_HTTPSENDREQUESTW *req;
|
||||||
|
|
||||||
workRequest.asyncall = HTTPSENDREQUESTW;
|
workRequest.asyncall = CALLASYNCPROC;
|
||||||
|
workRequest.asyncproc = AsyncHttpSendRequestProc;
|
||||||
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
|
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
|
||||||
req = &workRequest.u.HttpSendRequestW;
|
req = &workRequest.u.HttpSendRequestW;
|
||||||
if (lpBuffersIn)
|
if (lpBuffersIn)
|
||||||
|
@ -1873,8 +1888,9 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
|
||||||
WORKREQUEST workRequest;
|
WORKREQUEST workRequest;
|
||||||
struct WORKREQ_HTTPSENDREQUESTW *req;
|
struct WORKREQ_HTTPSENDREQUESTW *req;
|
||||||
|
|
||||||
workRequest.asyncall = HTTPSENDREQUESTW;
|
workRequest.asyncall = CALLASYNCPROC;
|
||||||
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
|
workRequest.asyncproc = AsyncHttpSendRequestProc;
|
||||||
|
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
|
||||||
req = &workRequest.u.HttpSendRequestW;
|
req = &workRequest.u.HttpSendRequestW;
|
||||||
if (lpszHeaders)
|
if (lpszHeaders)
|
||||||
req->lpszHeader = WININET_strdupW(lpszHeaders);
|
req->lpszHeader = WININET_strdupW(lpszHeaders);
|
||||||
|
@ -2351,7 +2367,6 @@ lend:
|
||||||
return bSuccess;
|
return bSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* HTTP_Connect (internal)
|
* HTTP_Connect (internal)
|
||||||
*
|
*
|
||||||
|
|
|
@ -3363,21 +3363,6 @@ static VOID INTERNET_ExecuteWork(void)
|
||||||
}
|
}
|
||||||
break;
|
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:
|
case HTTPOPENREQUESTW:
|
||||||
{
|
{
|
||||||
struct WORKREQ_HTTPOPENREQUESTW *req = &workRequest.u.HttpOpenRequestW;
|
struct WORKREQ_HTTPOPENREQUESTW *req = &workRequest.u.HttpOpenRequestW;
|
||||||
|
|
|
@ -261,7 +261,6 @@ typedef enum
|
||||||
FTPREMOVEDIRECTORYW,
|
FTPREMOVEDIRECTORYW,
|
||||||
FTPRENAMEFILEW,
|
FTPRENAMEFILEW,
|
||||||
FTPFINDNEXTW,
|
FTPFINDNEXTW,
|
||||||
HTTPSENDREQUESTW,
|
|
||||||
HTTPOPENREQUESTW,
|
HTTPOPENREQUESTW,
|
||||||
INTERNETOPENURLW,
|
INTERNETOPENURLW,
|
||||||
INTERNETREADFILEEXA,
|
INTERNETREADFILEEXA,
|
||||||
|
|
Loading…
Reference in New Issue