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
7e121e48
Commit
7e121e48
authored
Jun 24, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Coalesce cookie headers.
parent
2516fb78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
cookie.c
dlls/winhttp/cookie.c
+2
-1
winhttp.c
dlls/winhttp/tests/winhttp.c
+25
-0
No files found.
dlls/winhttp/cookie.c
View file @
7e121e48
...
...
@@ -270,7 +270,8 @@ BOOL add_cookie_headers( request_t *request )
}
TRACE
(
"%s
\n
"
,
debugstr_w
(
header
));
add_request_headers
(
request
,
header
,
len
,
WINHTTP_ADDREQ_FLAG_ADD
);
add_request_headers
(
request
,
header
,
len
,
WINHTTP_ADDREQ_FLAG_ADD
|
WINHTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON
);
heap_free
(
header
);
}
}
...
...
dlls/winhttp/tests/winhttp.c
View file @
7e121e48
...
...
@@ -2014,6 +2014,11 @@ static DWORD CALLBACK server_thread(LPVOID param)
send
(
c
,
headmsg
,
sizeof
headmsg
-
1
,
0
);
continue
;
}
if
(
strstr
(
buffer
,
"GET /cookie3"
))
{
if
(
strstr
(
buffer
,
"Cookie: name=value2; 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
);
...
...
@@ -2621,6 +2626,9 @@ static void test_cookies( int port )
{
static
const
WCHAR
cookieW
[]
=
{
'/'
,
'c'
,
'o'
,
'o'
,
'k'
,
'i'
,
'e'
,
0
};
static
const
WCHAR
cookie2W
[]
=
{
'/'
,
'c'
,
'o'
,
'o'
,
'k'
,
'i'
,
'e'
,
'2'
,
0
};
static
const
WCHAR
cookie3W
[]
=
{
'/'
,
'c'
,
'o'
,
'o'
,
'k'
,
'i'
,
'e'
,
'3'
,
0
};
static
const
WCHAR
cookieheaderW
[]
=
{
'C'
,
'o'
,
'o'
,
'k'
,
'i'
,
'e'
,
':'
,
' '
,
'n'
,
'a'
,
'm'
,
'e'
,
'='
,
'v'
,
'a'
,
'l'
,
'u'
,
'e'
,
'2'
,
'\r'
,
'\n'
,
0
};
HINTERNET
ses
,
con
,
req
;
DWORD
status
,
size
;
BOOL
ret
;
...
...
@@ -2685,6 +2693,23 @@ static void test_cookies( int port )
ok
(
status
==
200
,
"request failed unexpectedly %u
\n
"
,
status
);
WinHttpCloseHandle
(
req
);
req
=
WinHttpOpenRequest
(
con
,
NULL
,
cookie3W
,
NULL
,
NULL
,
NULL
,
0
);
ok
(
req
!=
NULL
,
"failed to open a request %u
\n
"
,
GetLastError
()
);
ret
=
WinHttpSendRequest
(
req
,
cookieheaderW
,
~
0u
,
NULL
,
0
,
0
,
0
);
ok
(
ret
,
"failed to send request %u
\n
"
,
GetLastError
()
);
ret
=
WinHttpReceiveResponse
(
req
,
NULL
);
ok
(
ret
,
"failed to receive response %u
\n
"
,
GetLastError
()
);
status
=
0xdeadbeef
;
size
=
sizeof
(
status
);
ret
=
WinHttpQueryHeaders
(
req
,
WINHTTP_QUERY_STATUS_CODE
|
WINHTTP_QUERY_FLAG_NUMBER
,
NULL
,
&
status
,
&
size
,
NULL
);
ok
(
ret
,
"failed to query status code %u
\n
"
,
GetLastError
()
);
ok
(
status
==
200
||
broken
(
status
==
400
),
"request failed unexpectedly %u
\n
"
,
status
);
WinHttpCloseHandle
(
req
);
WinHttpCloseHandle
(
con
);
WinHttpCloseHandle
(
ses
);
...
...
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