winhttp: Store cookies in reverse order.
This matches more recent versions of Windows.
This commit is contained in:
parent
3c5cb7f8dc
commit
b9557e9227
|
@ -121,7 +121,7 @@ static BOOL add_cookie( session_t *session, cookie_t *cookie, WCHAR *domain_name
|
|||
else if ((old_cookie = find_cookie( domain, path, cookie->name ))) delete_cookie( old_cookie );
|
||||
|
||||
cookie->path = strdupW( path );
|
||||
list_add_tail( &domain->cookies, &cookie->entry );
|
||||
list_add_head( &domain->cookies, &cookie->entry );
|
||||
|
||||
TRACE("domain %s path %s <- %s=%s\n", debugstr_w(domain_name), debugstr_w(cookie->path),
|
||||
debugstr_w(cookie->name), debugstr_w(cookie->value));
|
||||
|
|
|
@ -2018,14 +2018,18 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
|||
if (strstr(buffer, "GET /cookie3"))
|
||||
{
|
||||
if (strstr(buffer, "Cookie: name=value2; NAME=value; name=value\r\n") ||
|
||||
strstr(buffer, "Cookie: name=value2; name=value; NAME=value\r\n")) send(c, okmsg, sizeof(okmsg) - 1, 0);
|
||||
else send(c, notokmsg, sizeof(notokmsg) - 1, 0);
|
||||
broken(strstr(buffer, "Cookie: name=value2; name=value; NAME=value\r\n") != NULL))
|
||||
send(c, okmsg, sizeof(okmsg) - 1, 0);
|
||||
else
|
||||
send(c, notokmsg, sizeof(notokmsg) - 1, 0);
|
||||
}
|
||||
if (strstr(buffer, "GET /cookie2"))
|
||||
{
|
||||
if (strstr(buffer, "Cookie: NAME=value; name=value\r\n") ||
|
||||
strstr(buffer, "Cookie: name=value; NAME=value\r\n")) send(c, okmsg, sizeof(okmsg) - 1, 0);
|
||||
else send(c, notokmsg, sizeof(notokmsg) - 1, 0);
|
||||
broken(strstr(buffer, "Cookie: name=value; NAME=value\r\n") != NULL))
|
||||
send(c, okmsg, sizeof(okmsg) - 1, 0);
|
||||
else
|
||||
send(c, notokmsg, sizeof(notokmsg) - 1, 0);
|
||||
}
|
||||
else if (strstr(buffer, "GET /cookie"))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue