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
68453a52
Commit
68453a52
authored
Dec 21, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Always set last error in HttpSendRequest{,Ex}.
parent
ae8c2ec2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
http.c
dlls/wininet/http.c
+2
-4
http.c
dlls/wininet/tests/http.c
+9
-4
No files found.
dlls/wininet/http.c
View file @
68453a52
...
...
@@ -4000,8 +4000,7 @@ lend:
WININET_Release
(
&
lpwhr
->
hdr
);
TRACE
(
"<---
\n
"
);
if
(
res
!=
ERROR_SUCCESS
)
SetLastError
(
res
);
SetLastError
(
res
);
return
res
==
ERROR_SUCCESS
;
}
...
...
@@ -4089,8 +4088,7 @@ lend:
if
(
lpwhr
)
WININET_Release
(
&
lpwhr
->
hdr
);
if
(
res
!=
ERROR_SUCCESS
)
SetLastError
(
res
);
SetLastError
(
res
);
return
res
==
ERROR_SUCCESS
;
}
...
...
dlls/wininet/tests/http.c
View file @
68453a52
...
...
@@ -971,8 +971,7 @@ static void HttpSendRequestEx_test(void)
HINTERNET
hRequest
;
INTERNET_BUFFERS
BufferIn
;
DWORD
dwBytesWritten
;
DWORD
dwBytesRead
;
DWORD
dwBytesWritten
,
dwBytesRead
,
error
;
CHAR
szBuffer
[
256
];
int
i
;
BOOL
ret
;
...
...
@@ -1008,8 +1007,11 @@ static void HttpSendRequestEx_test(void)
BufferIn
.
dwOffsetLow
=
0
;
BufferIn
.
dwOffsetHigh
=
0
;
SetLastError
(
0xdeadbeef
);
ret
=
HttpSendRequestEx
(
hRequest
,
&
BufferIn
,
NULL
,
0
,
0
);
ok
(
ret
,
"HttpSendRequestEx Failed with error %u
\n
"
,
GetLastError
());
error
=
GetLastError
();
ok
(
ret
,
"HttpSendRequestEx Failed with error %u
\n
"
,
error
);
ok
(
error
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
error
);
for
(
i
=
3
;
szPostData
[
i
];
i
++
)
ok
(
InternetWriteFile
(
hRequest
,
&
szPostData
[
i
],
1
,
&
dwBytesWritten
),
...
...
@@ -1752,7 +1754,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
static
void
test_basic_request
(
int
port
,
const
char
*
verb
,
const
char
*
url
)
{
HINTERNET
hi
,
hc
,
hr
;
DWORD
r
,
count
;
DWORD
r
,
count
,
error
;
char
buffer
[
0x100
];
hi
=
InternetOpen
(
NULL
,
INTERNET_OPEN_TYPE_DIRECT
,
NULL
,
NULL
,
0
);
...
...
@@ -1764,8 +1766,11 @@ static void test_basic_request(int port, const char *verb, const char *url)
hr
=
HttpOpenRequest
(
hc
,
verb
,
url
,
NULL
,
NULL
,
NULL
,
0
,
0
);
ok
(
hr
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
SetLastError
(
0xdeadbeef
);
r
=
HttpSendRequest
(
hr
,
NULL
,
0
,
NULL
,
0
);
error
=
GetLastError
();
ok
(
r
,
"HttpSendRequest failed
\n
"
);
ok
(
error
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
error
);
count
=
0
;
memset
(
buffer
,
0
,
sizeof
buffer
);
...
...
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