Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
db441cf5
Commit
db441cf5
authored
Jul 04, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Added support for INTERNET_COOKIE_HTTPONLY flag to InternetGetCookieEx.
parent
314e2958
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
cookie.c
dlls/wininet/cookie.c
+5
-2
http.c
dlls/wininet/http.c
+2
-2
internet.h
dlls/wininet/internet.h
+1
-1
No files found.
dlls/wininet/cookie.c
View file @
db441cf5
...
...
@@ -531,7 +531,7 @@ static void COOKIE_deleteDomain(cookie_domain *deadDomain)
heap_free
(
deadDomain
);
}
DWORD
get_cookie
(
const
WCHAR
*
host
,
const
WCHAR
*
path
,
WCHAR
*
cookie_data
,
DWORD
*
size
)
DWORD
get_cookie
(
const
WCHAR
*
host
,
const
WCHAR
*
path
,
WCHAR
*
cookie_data
,
DWORD
*
size
,
DWORD
flags
)
{
static
const
WCHAR
empty_path
[]
=
{
'/'
,
0
};
...
...
@@ -590,6 +590,9 @@ DWORD get_cookie(const WCHAR *host, const WCHAR *path, WCHAR *cookie_data, DWORD
continue
;
}
if
((
cookie_iter
->
flags
&
INTERNET_COOKIE_HTTPONLY
)
&&
!
(
flags
&
INTERNET_COOKIE_HTTPONLY
))
continue
;
if
(
cookie_count
)
cnt
+=
2
;
/* '; ' */
cnt
+=
name_len
=
strlenW
(
cookie_iter
->
lpCookieName
);
...
...
@@ -686,7 +689,7 @@ BOOL WINAPI InternetGetCookieExW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
return
FALSE
;
}
res
=
get_cookie
(
host
,
path
,
lpCookieData
,
lpdwSize
);
res
=
get_cookie
(
host
,
path
,
lpCookieData
,
lpdwSize
,
flags
);
if
(
res
!=
ERROR_SUCCESS
)
SetLastError
(
res
);
return
res
==
ERROR_SUCCESS
;
...
...
dlls/wininet/http.c
View file @
db441cf5
...
...
@@ -4186,7 +4186,7 @@ static void HTTP_InsertCookies(http_request_t *request)
if
(
!
host
)
return
;
if
(
get_cookie
(
host
->
lpszValue
,
request
->
path
,
NULL
,
&
cookie_size
)
!=
ERROR_SUCCESS
)
if
(
get_cookie
(
host
->
lpszValue
,
request
->
path
,
NULL
,
&
cookie_size
,
INTERNET_COOKIE_HTTPONLY
)
!=
ERROR_SUCCESS
)
return
;
size
=
sizeof
(
cookieW
)
+
cookie_size
*
sizeof
(
WCHAR
)
+
sizeof
(
szCrLf
);
...
...
@@ -4194,7 +4194,7 @@ static void HTTP_InsertCookies(http_request_t *request)
return
;
cnt
+=
sprintfW
(
cookies
,
cookieW
);
get_cookie
(
host
->
lpszValue
,
request
->
path
,
cookies
+
cnt
,
&
cookie_size
);
get_cookie
(
host
->
lpszValue
,
request
->
path
,
cookies
+
cnt
,
&
cookie_size
,
INTERNET_COOKIE_HTTPONLY
);
strcatW
(
cookies
,
szCrLf
);
HTTP_HttpAddRequestHeadersW
(
request
,
cookies
,
strlenW
(
cookies
),
HTTP_ADDREQ_FLAG_REPLACE
);
...
...
dlls/wininet/internet.h
View file @
db441cf5
...
...
@@ -420,7 +420,7 @@ DWORD HTTP_Connect(appinfo_t*,LPCWSTR,
BOOL
GetAddress
(
LPCWSTR
lpszServerName
,
INTERNET_PORT
nServerPort
,
struct
sockaddr
*
psa
,
socklen_t
*
sa_len
)
DECLSPEC_HIDDEN
;
DWORD
get_cookie
(
const
WCHAR
*
,
const
WCHAR
*
,
WCHAR
*
,
DWORD
*
)
DECLSPEC_HIDDEN
;
DWORD
get_cookie
(
const
WCHAR
*
,
const
WCHAR
*
,
WCHAR
*
,
DWORD
*
,
DWORD
)
DECLSPEC_HIDDEN
;
DWORD
set_cookie
(
const
WCHAR
*
,
const
WCHAR
*
,
const
WCHAR
*
,
const
WCHAR
*
,
DWORD
)
DECLSPEC_HIDDEN
;
void
INTERNET_SetLastError
(
DWORD
dwError
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment