diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 5f0e2b139f1..40d643607db 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -285,18 +285,13 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr ) static void HTTP_ProcessHeaders( LPWININETHTTPREQW lpwhr ) { - int CustHeaderIndex; - static const WCHAR szSetCookie[] = {'S','e','t','-','C','o','o','k','i','e',0 }; + LPHTTPHEADERW setCookieHeader = &lpwhr->StdHeaders[HTTP_QUERY_SET_COOKIE]; - CustHeaderIndex = HTTP_GetCustomHeaderIndex(lpwhr, szSetCookie); - if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && (CustHeaderIndex >= 0)) + if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && setCookieHeader->lpszValue) { - LPHTTPHEADERW setCookieHeader; int nPosStart = 0, nPosEnd = 0, len; static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0}; - setCookieHeader = &lpwhr->pCustHeaders[CustHeaderIndex]; - while (setCookieHeader->lpszValue[nPosEnd] != '\0') { LPWSTR buf_cookie, cookie_name, cookie_data;