Commit 225a9fac authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

Simplify and fix Set-Cookie handling.

parent 5f7bb17c
......@@ -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;
......
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