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
788f588f
Commit
788f588f
authored
Aug 02, 2019
by
Hans Leidekker
Committed by
Alexandre Julliard
Aug 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Set last error for invalid and unimplemented header queries.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d6a80a48
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
request.c
dlls/winhttp/request.c
+7
-1
winhttp.c
dlls/winhttp/tests/winhttp.c
+8
-0
No files found.
dlls/winhttp/request.c
View file @
788f588f
...
...
@@ -746,9 +746,15 @@ static BOOL query_headers( struct request *request, DWORD level, const WCHAR *na
return
ret
;
default:
if
(
attr
>=
ARRAY_SIZE
(
attribute_table
)
||
!
attribute_table
[
attr
])
if
(
attr
>=
ARRAY_SIZE
(
attribute_table
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
attribute_table
[
attr
])
{
FIXME
(
"attribute %u not implemented
\n
"
,
attr
);
SetLastError
(
ERROR_WINHTTP_HEADER_NOT_FOUND
);
return
FALSE
;
}
TRACE
(
"attribute %s
\n
"
,
debugstr_w
(
attribute_table
[
attr
]));
...
...
dlls/winhttp/tests/winhttp.c
View file @
788f588f
...
...
@@ -456,6 +456,14 @@ static void test_WinHttpSendRequest (void)
"Expected ERROR_SUCCESS got %u.
\n
"
,
GetLastError
());
ok
(
ret
==
TRUE
,
"WinHttpReceiveResponse failed: %u.
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpQueryHeaders
(
request
,
WINHTTP_QUERY_ORIG_URI
,
NULL
,
NULL
,
&
len
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_WINHTTP_HEADER_NOT_FOUND
,
"got %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpQueryHeaders
(
request
,
WINHTTP_QUERY_MAX
+
1
,
NULL
,
NULL
,
&
len
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"got %u
\n
"
,
GetLastError
());
bytes_rw
=
-
1
;
ret
=
WinHttpReadData
(
request
,
buffer
,
sizeof
(
buffer
)
-
1
,
&
bytes_rw
);
ok
(
ret
==
TRUE
,
"WinHttpReadData failed: %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