Simplify and fix Set-Cookie handling.
This commit is contained in:
parent
5f7bb17cf4
commit
225a9facd4
|
@ -285,18 +285,13 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr )
|
||||||
|
|
||||||
static void HTTP_ProcessHeaders( LPWININETHTTPREQW lpwhr )
|
static void HTTP_ProcessHeaders( LPWININETHTTPREQW lpwhr )
|
||||||
{
|
{
|
||||||
int CustHeaderIndex;
|
LPHTTPHEADERW setCookieHeader = &lpwhr->StdHeaders[HTTP_QUERY_SET_COOKIE];
|
||||||
static const WCHAR szSetCookie[] = {'S','e','t','-','C','o','o','k','i','e',0 };
|
|
||||||
|
|
||||||
CustHeaderIndex = HTTP_GetCustomHeaderIndex(lpwhr, szSetCookie);
|
if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && setCookieHeader->lpszValue)
|
||||||
if (!(lpwhr->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES) && (CustHeaderIndex >= 0))
|
|
||||||
{
|
{
|
||||||
LPHTTPHEADERW setCookieHeader;
|
|
||||||
int nPosStart = 0, nPosEnd = 0, len;
|
int nPosStart = 0, nPosEnd = 0, len;
|
||||||
static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0};
|
static const WCHAR szFmt[] = { 'h','t','t','p',':','/','/','%','s','/',0};
|
||||||
|
|
||||||
setCookieHeader = &lpwhr->pCustHeaders[CustHeaderIndex];
|
|
||||||
|
|
||||||
while (setCookieHeader->lpszValue[nPosEnd] != '\0')
|
while (setCookieHeader->lpszValue[nPosEnd] != '\0')
|
||||||
{
|
{
|
||||||
LPWSTR buf_cookie, cookie_name, cookie_data;
|
LPWSTR buf_cookie, cookie_name, cookie_data;
|
||||||
|
|
Loading…
Reference in New Issue