From 225a9facd4d7077566d5a74b5668f484ef781f3b Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Mon, 28 Nov 2005 11:24:41 +0100 Subject: [PATCH] Simplify and fix Set-Cookie handling. --- dlls/wininet/http.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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;