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
694d43a9
Commit
694d43a9
authored
Jul 23, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Set last error if the server didn't return a valid response.
parent
b218ed1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
request.c
dlls/winhttp/request.c
+5
-2
winhttp.c
dlls/winhttp/tests/winhttp.c
+4
-0
No files found.
dlls/winhttp/request.c
View file @
694d43a9
...
...
@@ -1828,8 +1828,11 @@ static BOOL receive_response( request_t *request, BOOL async )
for
(;;)
{
if
(
!
(
ret
=
read_reply
(
request
)))
break
;
if
(
!
(
ret
=
read_reply
(
request
)))
{
set_last_error
(
ERROR_WINHTTP_INVALID_SERVER_RESPONSE
);
break
;
}
size
=
sizeof
(
DWORD
);
query
=
WINHTTP_QUERY_STATUS_CODE
|
WINHTTP_QUERY_FLAG_NUMBER
;
if
(
!
(
ret
=
query_headers
(
request
,
query
,
NULL
,
&
status
,
&
size
,
NULL
)))
break
;
...
...
dlls/winhttp/tests/winhttp.c
View file @
694d43a9
...
...
@@ -1955,6 +1955,7 @@ static void test_no_headers(int port)
{
static
const
WCHAR
no_headersW
[]
=
{
'/'
,
'n'
,
'o'
,
'_'
,
'h'
,
'e'
,
'a'
,
'd'
,
'e'
,
'r'
,
's'
,
0
};
HINTERNET
ses
,
con
,
req
;
DWORD
error
;
BOOL
ret
;
ses
=
WinHttpOpen
(
test_useragent
,
0
,
NULL
,
NULL
,
0
);
...
...
@@ -1969,8 +1970,11 @@ static void test_no_headers(int port)
ret
=
WinHttpSendRequest
(
req
,
NULL
,
0
,
NULL
,
0
,
0
,
0
);
ok
(
ret
,
"failed to send request %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpReceiveResponse
(
req
,
NULL
);
error
=
GetLastError
();
ok
(
!
ret
,
"expected failure
\n
"
);
ok
(
error
==
ERROR_WINHTTP_INVALID_SERVER_RESPONSE
,
"got %u
\n
"
,
error
);
WinHttpCloseHandle
(
req
);
WinHttpCloseHandle
(
con
);
...
...
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