From d6315926e62b55c9e0e7d1b2f67597c70ed45346 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Mon, 19 Jul 2004 21:18:33 +0000 Subject: [PATCH] Honour INTERNET_FLAG_NO_COOKIES. --- dlls/wininet/http.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index d2cbf57d226..64a30679e34 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -789,7 +789,8 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(HINTERNET hHttpSession, lpszUrl = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); sprintfW( lpszUrl, szUrlForm, lpwhr->lpszHostName ); - if (InternetGetCookieW(lpszUrl, NULL, NULL, &nCookieSize)) + if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && + InternetGetCookieW(lpszUrl, NULL, NULL, &nCookieSize)) { int cnt = 0; static const WCHAR szCookie[] = {'C','o','o','k','i','e',':',' ',0}; @@ -1649,7 +1650,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders, /* process headers here. Is this right? */ CustHeaderIndex = HTTP_GetCustomHeaderIndex(lpwhr, szSetCookie); - if (CustHeaderIndex >= 0) + if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && (CustHeaderIndex >= 0)) { LPHTTPHEADERW setCookieHeader; int nPosStart = 0, nPosEnd = 0, len;