Simplify and fix Set-Cookie handling.

This commit is contained in:
Robert Shearman 2005-11-28 11:24:41 +01:00 committed by Alexandre Julliard
parent 5f7bb17cf4
commit 225a9facd4
1 changed files with 2 additions and 7 deletions

View File

@ -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;