mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 20:18:28 +00:00
wininet: Ignore unknown attributes in get_cookie.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3a7bd03da0
commit
0d9dcf5c8f
2 changed files with 5 additions and 2 deletions
|
@ -911,6 +911,7 @@ DWORD set_cookie(substr_t domain, substr_t path, substr_t name, substr_t data, D
|
|||
static const WCHAR szSecure[] = {'s','e','c','u','r','e'};
|
||||
static const WCHAR szHttpOnly[] = {'h','t','t','p','o','n','l','y'};
|
||||
static const WCHAR szVersion[] = {'v','e','r','s','i','o','n','='};
|
||||
static const WCHAR max_ageW[] = {'m','a','x','-','a','g','e','='};
|
||||
|
||||
/* Skip ';' */
|
||||
if(data.len)
|
||||
|
@ -976,9 +977,11 @@ DWORD set_cookie(substr_t domain, substr_t path, substr_t name, substr_t data, D
|
|||
substr_skip(&data, len);
|
||||
|
||||
FIXME("version not handled (%s)\n",debugstr_wn(data.str, data.len));
|
||||
}else if(data.len >= (len = sizeof(max_ageW)/sizeof(WCHAR)) && !strncmpiW(data.str, max_ageW, len)) {
|
||||
/* Native doesn't support Max-Age attribute. */
|
||||
WARN("Max-Age ignored\n");
|
||||
}else if(data.len) {
|
||||
FIXME("Unknown additional option %s\n", debugstr_wn(data.str, data.len));
|
||||
break;
|
||||
}
|
||||
|
||||
substr_skip(&data, end_ptr - data.str);
|
||||
|
|
|
@ -388,7 +388,7 @@ static void test_complicated_cookie(void)
|
|||
/* Technically illegal! domain should require 2 dots, but native wininet accepts it */
|
||||
ret = InternetSetCookieA("http://www.example.com",NULL,"E=F; domain=example.com");
|
||||
ok(ret == TRUE,"InternetSetCookie failed\n");
|
||||
ret = InternetSetCookieA("http://www.example.com",NULL,"G=H; domain=.example.com; path=/foo");
|
||||
ret = InternetSetCookieA("http://www.example.com",NULL,"G=H; domain=.example.com; invalid=attr; path=/foo");
|
||||
ok(ret == TRUE,"InternetSetCookie failed\n");
|
||||
ret = InternetSetCookieA("http://www.example.com/bar.html",NULL,"I=J; domain=.example.com");
|
||||
ok(ret == TRUE,"InternetSetCookie failed\n");
|
||||
|
|
Loading…
Reference in a new issue