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
0b61334b
Commit
0b61334b
authored
May 03, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
May 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Fix invalid option error returned from WinHttpSetOption.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2bba4576
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
session.c
dlls/winhttp/session.c
+3
-3
winhttp.c
dlls/winhttp/tests/winhttp.c
+24
-0
No files found.
dlls/winhttp/session.c
View file @
0b61334b
...
...
@@ -225,7 +225,7 @@ static BOOL session_set_option( object_header_t *hdr, DWORD option, LPVOID buffe
return
TRUE
;
default:
FIXME
(
"unimplemented option %u
\n
"
,
option
);
set_last_error
(
ERROR_
INVALID_PARAMETER
);
set_last_error
(
ERROR_
WINHTTP_INVALID_OPTION
);
return
FALSE
;
}
}
...
...
@@ -1024,8 +1024,8 @@ static BOOL request_set_option( object_header_t *hdr, DWORD option, LPVOID buffe
return
TRUE
;
default:
FIXME
(
"unimplemented option %u
\n
"
,
option
);
set_last_error
(
ERROR_
INVALID_PARAMETER
);
return
TRU
E
;
set_last_error
(
ERROR_
WINHTTP_INVALID_OPTION
);
return
FALS
E
;
}
}
...
...
dlls/winhttp/tests/winhttp.c
View file @
0b61334b
...
...
@@ -2267,12 +2267,36 @@ static void test_basic_request(int port, const WCHAR *verb, const WCHAR *path)
ses
=
WinHttpOpen
(
test_useragent
,
WINHTTP_ACCESS_TYPE_NO_PROXY
,
NULL
,
NULL
,
0
);
ok
(
ses
!=
NULL
,
"failed to open session %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpSetOption
(
ses
,
0
,
buffer
,
sizeof
(
buffer
));
ok
(
!
ret
&&
GetLastError
()
==
ERROR_WINHTTP_INVALID_OPTION
,
"got %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpQueryOption
(
ses
,
0
,
buffer
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u
\n
"
,
GetLastError
());
con
=
WinHttpConnect
(
ses
,
localhostW
,
port
,
0
);
ok
(
con
!=
NULL
,
"failed to open a connection %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpSetOption
(
con
,
0
,
buffer
,
sizeof
(
buffer
));
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_WINHTTP_INVALID_OPTION
,
"got %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpQueryOption
(
con
,
0
,
buffer
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u
\n
"
,
GetLastError
());
req
=
WinHttpOpenRequest
(
con
,
verb
,
path
,
NULL
,
NULL
,
NULL
,
0
);
ok
(
req
!=
NULL
,
"failed to open a request %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpSetOption
(
req
,
0
,
buffer
,
sizeof
(
buffer
));
ok
(
!
ret
&&
GetLastError
()
==
ERROR_WINHTTP_INVALID_OPTION
,
"got %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpQueryOption
(
req
,
0
,
buffer
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u
\n
"
,
GetLastError
());
ret
=
WinHttpSendRequest
(
req
,
NULL
,
0
,
NULL
,
0
,
0
,
0
);
ok
(
ret
,
"failed to send request %u
\n
"
,
GetLastError
());
...
...
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