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
6ae6ea99
Commit
6ae6ea99
authored
Aug 10, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Aug 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Partially implement InternetQueryOption for INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO.
parent
7dd7109e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
19 deletions
+55
-19
http.c
dlls/wininet/http.c
+55
-19
No files found.
dlls/wininet/http.c
View file @
6ae6ea99
...
...
@@ -1589,11 +1589,65 @@ static BOOL HTTP_GetRequestURL(http_request_t *req, LPWSTR buf)
return
TRUE
;
}
static
BOOL
HTTP_KeepAlive
(
http_request_t
*
lpwhr
)
{
WCHAR
szVersion
[
10
];
WCHAR
szConnectionResponse
[
20
];
DWORD
dwBufferSize
=
sizeof
(
szVersion
);
BOOL
keepalive
=
FALSE
;
/* as per RFC 2068, S8.1.2.1, if the client is HTTP/1.1 then assume that
* the connection is keep-alive by default */
if
(
HTTP_HttpQueryInfoW
(
lpwhr
,
HTTP_QUERY_VERSION
,
szVersion
,
&
dwBufferSize
,
NULL
)
&&
!
strcmpiW
(
szVersion
,
g_szHttp1_1
))
{
keepalive
=
TRUE
;
}
dwBufferSize
=
sizeof
(
szConnectionResponse
);
if
(
HTTP_HttpQueryInfoW
(
lpwhr
,
HTTP_QUERY_PROXY_CONNECTION
,
szConnectionResponse
,
&
dwBufferSize
,
NULL
)
||
HTTP_HttpQueryInfoW
(
lpwhr
,
HTTP_QUERY_CONNECTION
,
szConnectionResponse
,
&
dwBufferSize
,
NULL
))
{
keepalive
=
!
strcmpiW
(
szConnectionResponse
,
szKeepAlive
);
}
return
keepalive
;
}
static
DWORD
HTTPREQ_QueryOption
(
object_header_t
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
{
http_request_t
*
req
=
(
http_request_t
*
)
hdr
;
switch
(
option
)
{
case
INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO
:
{
http_session_t
*
lpwhs
=
req
->
lpHttpSession
;
INTERNET_DIAGNOSTIC_SOCKET_INFO
*
info
=
buffer
;
FIXME
(
"INTERNET_DIAGNOSTIC_SOCKET_INFO stub
\n
"
);
if
(
*
size
<
sizeof
(
INTERNET_DIAGNOSTIC_SOCKET_INFO
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
sizeof
(
INTERNET_DIAGNOSTIC_SOCKET_INFO
);
/* FIXME: can't get a SOCKET from our connection since we don't use
* winsock
*/
info
->
Socket
=
0
;
/* FIXME: get source port from req->netConnection */
info
->
SourcePort
=
0
;
info
->
DestPort
=
lpwhs
->
nHostPort
;
info
->
Flags
=
0
;
if
(
HTTP_KeepAlive
(
req
))
info
->
Flags
|=
IDSI_FLAG_KEEP_ALIVE
;
if
(
lpwhs
->
lpAppInfo
->
lpszProxy
&&
lpwhs
->
lpAppInfo
->
lpszProxy
[
0
]
!=
0
)
info
->
Flags
|=
IDSI_FLAG_PROXY
;
if
(
req
->
netConnection
.
useSSL
)
info
->
Flags
|=
IDSI_FLAG_SECURE
;
return
ERROR_SUCCESS
;
}
case
INTERNET_OPTION_SECURITY_FLAGS
:
{
http_session_t
*
lpwhs
;
...
...
@@ -4582,28 +4636,10 @@ static BOOL HTTP_ProcessHeader(http_request_t *lpwhr, LPCWSTR field, LPCWSTR val
*/
static
BOOL
HTTP_FinishedReading
(
http_request_t
*
lpwhr
)
{
WCHAR
szVersion
[
10
];
WCHAR
szConnectionResponse
[
20
];
DWORD
dwBufferSize
=
sizeof
(
szVersion
);
BOOL
keepalive
=
FALSE
;
BOOL
keepalive
=
HTTP_KeepAlive
(
lpwhr
);
TRACE
(
"
\n
"
);
/* as per RFC 2068, S8.1.2.1, if the client is HTTP/1.1 then assume that
* the connection is keep-alive by default */
if
(
HTTP_HttpQueryInfoW
(
lpwhr
,
HTTP_QUERY_VERSION
,
szVersion
,
&
dwBufferSize
,
NULL
)
&&
!
strcmpiW
(
szVersion
,
g_szHttp1_1
))
{
keepalive
=
TRUE
;
}
dwBufferSize
=
sizeof
(
szConnectionResponse
);
if
(
HTTP_HttpQueryInfoW
(
lpwhr
,
HTTP_QUERY_PROXY_CONNECTION
,
szConnectionResponse
,
&
dwBufferSize
,
NULL
)
||
HTTP_HttpQueryInfoW
(
lpwhr
,
HTTP_QUERY_CONNECTION
,
szConnectionResponse
,
&
dwBufferSize
,
NULL
))
{
keepalive
=
!
strcmpiW
(
szConnectionResponse
,
szKeepAlive
);
}
if
(
!
keepalive
)
{
...
...
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