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
ff97d397
Commit
ff97d397
authored
Apr 08, 2024
by
Paul Gofman
Committed by
Alexandre Julliard
Apr 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Do not cache connection if suggested by request headers.
parent
11b8243f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
request.c
dlls/winhttp/request.c
+9
-11
winhttp.c
dlls/winhttp/tests/winhttp.c
+1
-1
No files found.
dlls/winhttp/request.c
View file @
ff97d397
...
...
@@ -1922,7 +1922,7 @@ static DWORD refill_buffer( struct request *request, BOOL notify )
static
void
finished_reading
(
struct
request
*
request
)
{
BOOL
close
=
FALSE
,
notify
;
BOOL
close
=
FALSE
,
close_request_headers
;
WCHAR
connection
[
20
];
DWORD
size
=
sizeof
(
connection
);
...
...
@@ -1937,18 +1937,16 @@ static void finished_reading( struct request *request )
}
else
if
(
!
wcscmp
(
request
->
version
,
L"HTTP/1.0"
))
close
=
TRUE
;
if
(
close
)
size
=
sizeof
(
connection
);
close_request_headers
=
(
!
query_headers
(
request
,
WINHTTP_QUERY_CONNECTION
|
WINHTTP_QUERY_FLAG_REQUEST_HEADERS
,
NULL
,
connection
,
&
size
,
NULL
)
||
!
query_headers
(
request
,
WINHTTP_QUERY_PROXY_CONNECTION
|
WINHTTP_QUERY_FLAG_REQUEST_HEADERS
,
NULL
,
connection
,
&
size
,
NULL
))
&&
!
wcsicmp
(
connection
,
L"close"
);
if
(
close
||
close_request_headers
)
{
size
=
sizeof
(
connection
);
notify
=
(
!
query_headers
(
request
,
WINHTTP_QUERY_CONNECTION
|
WINHTTP_QUERY_FLAG_REQUEST_HEADERS
,
NULL
,
connection
,
&
size
,
NULL
)
||
!
query_headers
(
request
,
WINHTTP_QUERY_PROXY_CONNECTION
|
WINHTTP_QUERY_FLAG_REQUEST_HEADERS
,
NULL
,
connection
,
&
size
,
NULL
))
&&
!
wcsicmp
(
connection
,
L"close"
);
if
(
notify
)
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION
,
0
,
0
);
if
(
close_request_headers
)
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION
,
0
,
0
);
netconn_release
(
request
->
netconn
);
if
(
notify
)
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED
,
0
,
0
);
if
(
close_request_headers
)
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED
,
0
,
0
);
}
else
cache_connection
(
request
->
netconn
);
...
...
dlls/winhttp/tests/winhttp.c
View file @
ff97d397
...
...
@@ -2591,7 +2591,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
ok
(
!!
strstr
(
buffer
,
"GET /cached"
),
"request not found.
\n
"
);
send
(
c
,
okmsg_length0
,
sizeof
okmsg_length0
-
1
,
0
);
r
=
server_receive_request
(
c
,
buffer
,
sizeof
(
buffer
));
todo_wine
ok
(
!
r
,
"got %d, buffer[0] %d.
\n
"
,
r
,
buffer
[
0
]);
ok
(
!
r
,
"got %d, buffer[0] %d.
\n
"
,
r
,
buffer
[
0
]);
}
if
(
strstr
(
buffer
,
"GET /notcached"
))
{
...
...
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