winhttp: Perform a case sensitive match on cookie names.
This commit is contained in:
parent
7e121e4871
commit
3c5cb7f8dc
|
@ -54,7 +54,7 @@ static cookie_t *find_cookie( domain_t *domain, const WCHAR *path, const WCHAR *
|
|||
LIST_FOR_EACH( item, &domain->cookies )
|
||||
{
|
||||
cookie = LIST_ENTRY( item, cookie_t, entry );
|
||||
if (!strcmpW( cookie->path, path ) && !strcmpiW( cookie->name, name ))
|
||||
if (!strcmpW( cookie->path, path ) && !strcmpW( cookie->name, name ))
|
||||
{
|
||||
TRACE("found %s=%s\n", debugstr_w(cookie->name), debugstr_w(cookie->value));
|
||||
return cookie;
|
||||
|
|
|
@ -1893,6 +1893,7 @@ static const char notokmsg[] =
|
|||
static const char cookiemsg[] =
|
||||
"HTTP/1.1 200 OK\r\n"
|
||||
"Set-Cookie: name = value \r\n"
|
||||
"Set-Cookie: NAME = value \r\n"
|
||||
"\r\n";
|
||||
|
||||
static const char nocontentmsg[] =
|
||||
|
@ -2016,12 +2017,14 @@ static DWORD CALLBACK server_thread(LPVOID param)
|
|||
}
|
||||
if (strstr(buffer, "GET /cookie3"))
|
||||
{
|
||||
if (strstr(buffer, "Cookie: name=value2; name=value\r\n")) send(c, okmsg, sizeof(okmsg) - 1, 0);
|
||||
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);
|
||||
}
|
||||
if (strstr(buffer, "GET /cookie2"))
|
||||
{
|
||||
if (strstr(buffer, "Cookie: name=value\r\n")) send(c, okmsg, sizeof(okmsg) - 1, 0);
|
||||
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);
|
||||
}
|
||||
else if (strstr(buffer, "GET /cookie"))
|
||||
|
|
Loading…
Reference in New Issue