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
70f2f5d6
Commit
70f2f5d6
authored
Sep 16, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Close the network connection if necessary.
parent
5c1c923d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
request.c
dlls/winhttp/request.c
+15
-1
winhttp_private.h
dlls/winhttp/winhttp_private.h
+1
-0
No files found.
dlls/winhttp/request.c
View file @
70f2f5d6
...
...
@@ -1225,7 +1225,21 @@ static BOOL receive_data_chunked( request_t *request, void *buffer, DWORD size,
static
void
finished_reading
(
request_t
*
request
)
{
/* FIXME: close connection here if necessary */
static
const
WCHAR
closeW
[]
=
{
'c'
,
'l'
,
'o'
,
's'
,
'e'
,
0
};
BOOL
close
=
FALSE
;
WCHAR
connection
[
20
];
DWORD
size
=
sizeof
(
connection
);
if
(
request
->
hdr
.
disable_flags
&
WINHTTP_DISABLE_KEEP_ALIVE
)
close
=
TRUE
;
else
if
(
query_headers
(
request
,
WINHTTP_QUERY_CONNECTION
,
NULL
,
connection
,
&
size
,
NULL
)
||
query_headers
(
request
,
WINHTTP_QUERY_PROXY_CONNECTION
,
NULL
,
connection
,
&
size
,
NULL
))
{
if
(
!
strcmpiW
(
connection
,
closeW
))
close
=
TRUE
;
}
else
if
(
!
strcmpW
(
request
->
version
,
http1_0
))
close
=
TRUE
;
if
(
close
)
close_connection
(
request
);
request
->
content_length
=
~
0UL
;
request
->
content_read
=
0
;
}
...
...
dlls/winhttp/winhttp_private.h
View file @
70f2f5d6
...
...
@@ -39,6 +39,7 @@
static
const
WCHAR
getW
[]
=
{
'G'
,
'E'
,
'T'
,
0
};
static
const
WCHAR
postW
[]
=
{
'P'
,
'O'
,
'S'
,
'T'
,
0
};
static
const
WCHAR
slashW
[]
=
{
'/'
,
0
};
static
const
WCHAR
http1_0
[]
=
{
'H'
,
'T'
,
'T'
,
'P'
,
'/'
,
'1'
,
'.'
,
'0'
,
0
};
static
const
WCHAR
http1_1
[]
=
{
'H'
,
'T'
,
'T'
,
'P'
,
'/'
,
'1'
,
'.'
,
'1'
,
0
};
typedef
struct
_object_header_t
object_header_t
;
...
...
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