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
12931062
Commit
12931062
authored
Jan 13, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Make sure that we have data buffered before sending…
wininet: Make sure that we have data buffered before sending INTERNET_STATUS_REQUEST_COMPLETE notification.
parent
49177a09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
16 deletions
+36
-16
http.c
dlls/wininet/http.c
+35
-15
http.c
dlls/wininet/tests/http.c
+1
-1
No files found.
dlls/wininet/http.c
View file @
12931062
...
...
@@ -1636,6 +1636,29 @@ static DWORD HTTPREQ_SetOption(WININETHANDLEHEADER *hdr, DWORD option, void *buf
return
ERROR_INTERNET_INVALID_OPTION
;
}
static
void
HTTP_ReceiveRequestData
(
WININETHTTPREQW
*
req
)
{
INTERNET_ASYNC_RESULT
iar
;
BYTE
buffer
[
4096
];
BOOL
res
;
TRACE
(
"%p
\n
"
,
req
);
res
=
NETCON_recv
(
&
req
->
netConnection
,
buffer
,
min
(
sizeof
(
buffer
),
req
->
dwContentLength
-
req
->
dwContentRead
),
MSG_PEEK
,
(
int
*
)
&
iar
.
dwError
);
if
(
res
)
{
iar
.
dwResult
=
(
DWORD_PTR
)
req
->
hdr
.
hInternet
;
}
else
{
iar
.
dwResult
=
0
;
iar
.
dwError
=
INTERNET_GetLastError
();
}
INTERNET_SendCallback
(
&
req
->
hdr
,
req
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_COMPLETE
,
&
iar
,
sizeof
(
INTERNET_ASYNC_RESULT
));
}
static
DWORD
HTTP_Read
(
WININETHTTPREQW
*
req
,
void
*
buffer
,
DWORD
size
,
DWORD
*
read
,
BOOL
sync
)
{
int
bytes_read
;
...
...
@@ -1847,17 +1870,8 @@ static BOOL HTTPREQ_WriteFile(WININETHANDLEHEADER *hdr, const void *buffer, DWOR
static
void
HTTPREQ_AsyncQueryDataAvailableProc
(
WORKREQUEST
*
workRequest
)
{
WININETHTTPREQW
*
req
=
(
WININETHTTPREQW
*
)
workRequest
->
hdr
;
INTERNET_ASYNC_RESULT
iar
;
char
buffer
[
4048
];
TRACE
(
"%p
\n
"
,
workRequest
->
hdr
);
iar
.
dwResult
=
NETCON_recv
(
&
req
->
netConnection
,
buffer
,
min
(
sizeof
(
buffer
),
req
->
dwContentLength
-
req
->
dwContentRead
),
MSG_PEEK
,
(
int
*
)
&
iar
.
dwError
);
INTERNET_SendCallback
(
&
req
->
hdr
,
req
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_COMPLETE
,
&
iar
,
sizeof
(
INTERNET_ASYNC_RESULT
));
HTTP_ReceiveRequestData
(
req
);
}
static
DWORD
HTTPREQ_QueryDataAvailable
(
WININETHANDLEHEADER
*
hdr
,
DWORD
*
available
,
DWORD
flags
,
DWORD_PTR
ctx
)
...
...
@@ -3465,12 +3479,18 @@ lend:
/* TODO: send notification for P3P header */
iar
.
dwResult
=
(
DWORD_PTR
)
lpwhr
->
hdr
.
hInternet
;
iar
.
dwError
=
bSuccess
?
ERROR_SUCCESS
:
INTERNET_GetLastError
();
if
(
lpwhr
->
lpHttpSession
->
lpAppInfo
->
hdr
.
dwFlags
&
INTERNET_FLAG_ASYNC
)
{
if
(
bSuccess
)
{
HTTP_ReceiveRequestData
(
lpwhr
);
}
else
{
iar
.
dwResult
=
(
DWORD_PTR
)
lpwhr
->
hdr
.
hInternet
;
iar
.
dwError
=
INTERNET_GetLastError
();
INTERNET_SendCallback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_COMPLETE
,
&
iar
,
sizeof
(
INTERNET_ASYNC_RESULT
));
INTERNET_SendCallback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
INTERNET_STATUS_REQUEST_COMPLETE
,
&
iar
,
sizeof
(
INTERNET_ASYNC_RESULT
));
}
}
TRACE
(
"<--
\n
"
);
if
(
bSuccess
)
INTERNET_SetLastError
(
ERROR_SUCCESS
);
...
...
dlls/wininet/tests/http.c
View file @
12931062
...
...
@@ -367,7 +367,7 @@ static void InternetReadFile_test(int flags)
if
(
flags
&
INTERNET_FLAG_ASYNC
)
CHECK_NOTIFIED
(
INTERNET_STATUS_REQUEST_COMPLETE
);
else
todo_wine
CHECK_NOT_NOTIFIED
(
INTERNET_STATUS_REQUEST_COMPLETE
);
CHECK_NOT_NOTIFIED
(
INTERNET_STATUS_REQUEST_COMPLETE
);
/* Sent on WinXP only if first_connection_to_test_url is TRUE, on Win98 always sent */
CLEAR_NOTIFIED
(
INTERNET_STATUS_CONNECTING_TO_SERVER
);
CLEAR_NOTIFIED
(
INTERNET_STATUS_CONNECTED_TO_SERVER
);
...
...
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