Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c0400560
Commit
c0400560
authored
May 23, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
May 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Moved querying INTERNET_OPTION_REQUEST_FLAGS implementation to HTTPREQ_QueryOption.
parent
d2d225f6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
12 deletions
+34
-12
http.c
dlls/wininet/http.c
+10
-0
internet.c
dlls/wininet/internet.c
+8
-12
internet.c
dlls/wininet/tests/internet.c
+16
-0
No files found.
dlls/wininet/http.c
View file @
c0400560
...
...
@@ -2158,6 +2158,16 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
*
size
=
sizeof
(
DWORD
);
*
(
DWORD
*
)
buffer
=
req
->
connect_timeout
;
return
ERROR_SUCCESS
;
case
INTERNET_OPTION_REQUEST_FLAGS
:
TRACE
(
"INTERNET_OPTION_REQUEST_FLAGS
\n
"
);
if
(
*
size
<
sizeof
(
DWORD
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
(
DWORD
*
)
buffer
=
4
;
*
size
=
sizeof
(
DWORD
);
return
ERROR_SUCCESS
;
}
return
INET_QueryOption
(
hdr
,
option
,
buffer
,
size
,
unicode
);
...
...
dlls/wininet/internet.c
View file @
c0400560
...
...
@@ -1214,7 +1214,7 @@ HINTERNET WINAPI InternetConnectW(HINTERNET hInternet,
HINTERNET
rc
=
NULL
;
DWORD
res
=
ERROR_SUCCESS
;
TRACE
(
"(%p, %s, %i, %s, %s, %i, %
i
, %lx)
\n
"
,
hInternet
,
debugstr_w
(
lpszServerName
),
TRACE
(
"(%p, %s, %i, %s, %s, %i, %
x
, %lx)
\n
"
,
hInternet
,
debugstr_w
(
lpszServerName
),
nServerPort
,
debugstr_w
(
lpszUserName
),
debugstr_w
(
lpszPassword
),
dwService
,
dwFlags
,
dwContext
);
...
...
@@ -2319,17 +2319,6 @@ static DWORD query_global_option(DWORD option, void *buffer, DWORD *size, BOOL u
/* FIXME: This function currently handles more options than it should. Options requiring
* proper handles should be moved to proper functions */
switch
(
option
)
{
case
INTERNET_OPTION_REQUEST_FLAGS
:
TRACE
(
"INTERNET_OPTION_REQUEST_FLAGS
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
(
ULONG
*
)
buffer
=
4
;
*
size
=
sizeof
(
ULONG
);
return
ERROR_SUCCESS
;
case
INTERNET_OPTION_HTTP_VERSION
:
if
(
*
size
<
sizeof
(
HTTP_VERSION_INFO
))
return
ERROR_INSUFFICIENT_BUFFER
;
...
...
@@ -2471,7 +2460,9 @@ static DWORD query_global_option(DWORD option, void *buffer, DWORD *size, BOOL u
return
res
;
}
case
INTERNET_OPTION_REQUEST_FLAGS
:
case
INTERNET_OPTION_USER_AGENT
:
*
size
=
0
;
return
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
;
case
INTERNET_OPTION_POLICY
:
return
ERROR_INVALID_PARAMETER
;
...
...
@@ -2509,6 +2500,11 @@ DWORD INET_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *
*
size
=
sizeof
(
DWORD_PTR
);
return
ERROR_SUCCESS
;
case
INTERNET_OPTION_REQUEST_FLAGS
:
WARN
(
"INTERNET_OPTION_REQUEST_FLAGS
\n
"
);
*
size
=
sizeof
(
DWORD
);
return
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
;
case
INTERNET_OPTION_MAX_CONNS_PER_SERVER
:
case
INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER
:
WARN
(
"Called on global option %u
\n
"
,
option
);
...
...
dlls/wininet/tests/internet.c
View file @
c0400560
...
...
@@ -212,6 +212,22 @@ static void test_InternetQueryOptionA(void)
ok
(
retval
==
0
,
"Got wrong return value %d
\n
"
,
retval
);
ok
(
err
==
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
,
"Got wrong error code %d
\n
"
,
err
);
SetLastError
(
0xdeadbeef
);
len
=
sizeof
(
DWORD
);
retval
=
InternetQueryOptionA
(
hurl
,
INTERNET_OPTION_REQUEST_FLAGS
,
NULL
,
&
len
);
err
=
GetLastError
();
ok
(
retval
==
0
,
"Got wrong return value %d
\n
"
,
retval
);
ok
(
err
==
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
,
"Got wrong error code %d
\n
"
,
err
);
ok
(
len
==
sizeof
(
DWORD
),
"len = %d
\n
"
,
len
);
SetLastError
(
0xdeadbeef
);
len
=
sizeof
(
DWORD
);
retval
=
InternetQueryOptionA
(
NULL
,
INTERNET_OPTION_REQUEST_FLAGS
,
NULL
,
&
len
);
err
=
GetLastError
();
ok
(
retval
==
0
,
"Got wrong return value %d
\n
"
,
retval
);
ok
(
err
==
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
,
"Got wrong error code %d
\n
"
,
err
);
ok
(
!
len
,
"len = %d
\n
"
,
len
);
InternetCloseHandle
(
hurl
);
InternetCloseHandle
(
hinet
);
...
...
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