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
4c4a922e
Commit
4c4a922e
authored
Apr 24, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Improve searching for no-store header in HTTP response.
parent
c11da76d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
http.c
dlls/wininet/http.c
+24
-3
http.c
dlls/wininet/tests/http.c
+1
-1
No files found.
dlls/wininet/http.c
View file @
4c4a922e
...
...
@@ -2307,9 +2307,30 @@ static void create_cache_entry(http_request_t *req)
if
(
b
)
{
int
header_idx
=
HTTP_GetCustomHeaderIndex
(
req
,
szCache_Control
,
0
,
FALSE
);
if
(
header_idx
!=-
1
&&
(
!
strcmpiW
(
req
->
custHeaders
[
header_idx
].
lpszValue
,
no_cacheW
)
||
!
strcmpiW
(
req
->
custHeaders
[
header_idx
].
lpszValue
,
no_storeW
)))
b
=
FALSE
;
if
(
header_idx
!=
-
1
)
{
WCHAR
*
ptr
;
for
(
ptr
=
req
->
custHeaders
[
header_idx
].
lpszValue
;
*
ptr
;
)
{
WCHAR
*
end
;
while
(
*
ptr
==
' '
||
*
ptr
==
'\t'
)
ptr
++
;
end
=
strchrW
(
ptr
,
','
);
if
(
!
end
)
end
=
ptr
+
strlenW
(
ptr
);
if
(
!
strncmpiW
(
ptr
,
no_cacheW
,
sizeof
(
no_cacheW
)
/
sizeof
(
*
no_cacheW
)
-
1
)
||
!
strncmpiW
(
ptr
,
no_storeW
,
sizeof
(
no_storeW
)
/
sizeof
(
*
no_storeW
)
-
1
))
{
b
=
FALSE
;
break
;
}
ptr
=
end
;
if
(
*
ptr
==
','
)
ptr
++
;
}
}
}
if
(
!
b
)
{
...
...
dlls/wininet/tests/http.c
View file @
4c4a922e
...
...
@@ -2026,7 +2026,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
}
if
(
strstr
(
buffer
,
"GET /test_cache_control_no_store"
))
{
static
const
char
no_cache_response
[]
=
"HTTP/1.1 200 OK
\r\n
Cache-Control: No-StOrE
\r\n\r\n
some content"
;
static
const
char
no_cache_response
[]
=
"HTTP/1.1 200 OK
\r\n
Cache-Control:
junk,
\t
No-StOrE
\r\n\r\n
some content"
;
send
(
c
,
no_cache_response
,
sizeof
(
no_cache_response
)
-
1
,
0
);
}
if
(
strstr
(
buffer
,
"GET /test_premature_disconnect"
))
...
...
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