Commit 92ddc1c8 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

wininet: Clean up HTTP_GetCustomHeaderIndex.

parent 7f5e2732
...@@ -2988,7 +2988,8 @@ static void HTTP_CloseHTTPSessionHandle(LPWININETHANDLEHEADER hdr) ...@@ -2988,7 +2988,8 @@ static void HTTP_CloseHTTPSessionHandle(LPWININETHANDLEHEADER hdr)
* Return index of custom header from header array * Return index of custom header from header array
* *
*/ */
static INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField,int requested_index, BOOL request_only) static INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField,
int requested_index, BOOL request_only)
{ {
DWORD index; DWORD index;
...@@ -2996,19 +2997,18 @@ static INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField, ...@@ -2996,19 +2997,18 @@ static INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField,
for (index = 0; index < lpwhr->nCustHeaders; index++) for (index = 0; index < lpwhr->nCustHeaders; index++)
{ {
if (!strcmpiW(lpwhr->pCustHeaders[index].lpszField, lpszField)) if (strcmpiW(lpwhr->pCustHeaders[index].lpszField, lpszField))
{ continue;
if ((request_only &&
!(lpwhr->pCustHeaders[index].wFlags & HDR_ISREQUEST))|| if (request_only && !(lpwhr->pCustHeaders[index].wFlags & HDR_ISREQUEST))
(!request_only && continue;
(lpwhr->pCustHeaders[index].wFlags & HDR_ISREQUEST)))
if (!request_only && (lpwhr->pCustHeaders[index].wFlags & HDR_ISREQUEST))
continue; continue;
if (requested_index == 0) if (requested_index == 0)
break; break;
else requested_index --;
requested_index --;
}
} }
if (index >= lpwhr->nCustHeaders) if (index >= lpwhr->nCustHeaders)
......
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