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
0d50e86f
Commit
0d50e86f
authored
Apr 15, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fixed Cache-Content: no-cache tests.
parent
ca025a52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
http.c
dlls/wininet/tests/http.c
+16
-3
No files found.
dlls/wininet/tests/http.c
View file @
0d50e86f
...
@@ -1826,6 +1826,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
...
@@ -1826,6 +1826,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
int
last_request
=
0
;
int
last_request
=
0
;
char
host_header
[
22
];
char
host_header
[
22
];
static
int
test_b
=
0
;
static
int
test_b
=
0
;
static
int
test_no_cache
=
0
;
WSAStartup
(
MAKEWORD
(
1
,
1
),
&
wsaData
);
WSAStartup
(
MAKEWORD
(
1
,
1
),
&
wsaData
);
...
@@ -2018,7 +2019,10 @@ static DWORD CALLBACK server_thread(LPVOID param)
...
@@ -2018,7 +2019,10 @@ static DWORD CALLBACK server_thread(LPVOID param)
if
(
strstr
(
buffer
,
"GET /test_cache_control_no_cache"
))
if
(
strstr
(
buffer
,
"GET /test_cache_control_no_cache"
))
{
{
static
const
char
no_cache_response
[]
=
"HTTP/1.1 200 OK
\r\n
Cache-Control: no-cache
\r\n\r\n
some content"
;
static
const
char
no_cache_response
[]
=
"HTTP/1.1 200 OK
\r\n
Cache-Control: no-cache
\r\n\r\n
some content"
;
send
(
c
,
no_cache_response
,
sizeof
(
no_cache_response
)
-
1
,
0
);
if
(
!
test_no_cache
++
)
send
(
c
,
no_cache_response
,
sizeof
(
no_cache_response
)
-
1
,
0
);
else
send
(
c
,
okmsg
,
sizeof
(
okmsg
)
-
1
,
0
);
}
}
if
(
strstr
(
buffer
,
"GET /test_cache_control_no_store"
))
if
(
strstr
(
buffer
,
"GET /test_cache_control_no_store"
))
{
{
...
@@ -2517,8 +2521,17 @@ static void test_no_cache(int port)
...
@@ -2517,8 +2521,17 @@ static void test_no_cache(int port)
ok
(
size
==
12
,
"read %d bytes of data
\n
"
,
size
);
ok
(
size
==
12
,
"read %d bytes of data
\n
"
,
size
);
InternetCloseHandle
(
req
);
InternetCloseHandle
(
req
);
ret
=
DeleteUrlCacheEntry
(
cache_url
);
req
=
HttpOpenRequest
(
con
,
NULL
,
cache_control_no_cache
,
NULL
,
NULL
,
NULL
,
0
,
0
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"cache entry should not exist
\n
"
);
ok
(
req
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
ret
=
HttpSendRequest
(
req
,
NULL
,
0
,
NULL
,
0
);
ok
(
ret
,
"HttpSendRequest failed with error %u
\n
"
,
GetLastError
());
size
=
0
;
while
(
InternetReadFile
(
req
,
buf
,
sizeof
(
buf
),
&
read
)
&&
read
)
size
+=
read
;
ok
(
size
==
0
,
"read %d bytes of data
\n
"
,
size
);
InternetCloseHandle
(
req
);
DeleteUrlCacheEntry
(
cache_url
);
req
=
HttpOpenRequest
(
con
,
NULL
,
cache_control_no_store
,
NULL
,
NULL
,
NULL
,
0
,
0
);
req
=
HttpOpenRequest
(
con
,
NULL
,
cache_control_no_store
,
NULL
,
NULL
,
NULL
,
0
,
0
);
ok
(
req
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
ok
(
req
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
...
...
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