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
37cdf6bd
Commit
37cdf6bd
authored
Aug 23, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Aug 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Test and fix possible error situations for InternetQueryOption with INTERNET_OPTION_PROXY.
parent
535a55ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
internet.c
dlls/wininet/internet.c
+1
-0
http.c
dlls/wininet/tests/http.c
+21
-0
No files found.
dlls/wininet/internet.c
View file @
37cdf6bd
...
...
@@ -802,6 +802,7 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe
}
case
INTERNET_OPTION_PROXY
:
if
(
!
size
)
return
ERROR_INVALID_PARAMETER
;
if
(
unicode
)
{
INTERNET_PROXY_INFOW
*
pi
=
(
INTERNET_PROXY_INFOW
*
)
buffer
;
DWORD
proxyBytesRequired
=
0
,
proxyBypassBytesRequired
=
0
;
...
...
dlls/wininet/tests/http.c
View file @
37cdf6bd
...
...
@@ -2697,6 +2697,27 @@ static void test_options(int port)
ok
(
ret
,
"InternetQueryOption failed %u
\n
"
,
GetLastError
());
ok
(
ctx
==
3
,
"expected 3 got %lu
\n
"
,
ctx
);
/* INTERNET_OPTION_PROXY */
SetLastError
(
0xdeadbeef
);
ret
=
InternetQueryOptionA
(
ses
,
INTERNET_OPTION_PROXY
,
NULL
,
NULL
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetQueryOption succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
InternetQueryOptionA
(
ses
,
INTERNET_OPTION_PROXY
,
&
ctx
,
NULL
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetQueryOption succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %u
\n
"
,
error
);
size
=
0
;
SetLastError
(
0xdeadbeef
);
ret
=
InternetQueryOptionA
(
ses
,
INTERNET_OPTION_PROXY
,
NULL
,
&
size
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetQueryOption succeeded
\n
"
);
ok
(
error
==
ERROR_INSUFFICIENT_BUFFER
,
"expected ERROR_INSUFFICIENT_BUFFER, got %u
\n
"
,
error
);
ok
(
size
>=
sizeof
(
INTERNET_PROXY_INFOA
),
"expected size to be greater or equal to the struct size
\n
"
);
InternetCloseHandle
(
req
);
InternetCloseHandle
(
con
);
InternetCloseHandle
(
ses
);
...
...
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