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
902829ea
Commit
902829ea
authored
Aug 11, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added support for partial reads in read_stream_data.
parent
dbe0de73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
navigate.c
dlls/mshtml/navigate.c
+15
-10
No files found.
dlls/mshtml/navigate.c
View file @
902829ea
...
...
@@ -854,12 +854,12 @@ struct nsChannelBSC {
static
HRESULT
read_stream_data
(
nsChannelBSC
*
This
,
IStream
*
stream
)
{
DWORD
read
;
nsresult
nsres
;
HRESULT
hres
;
if
(
!
This
->
nslistener
)
{
BYTE
buf
[
1024
];
DWORD
read
;
do
{
read
=
0
;
...
...
@@ -873,17 +873,20 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
This
->
nsstream
=
create_nsprotocol_stream
();
do
{
hres
=
IStream_Read
(
stream
,
This
->
nsstream
->
buf
,
sizeof
(
This
->
nsstream
->
buf
),
&
This
->
nsstream
->
buf_size
);
if
(
!
This
->
nsstream
->
buf_size
)
read
=
0
;
hres
=
IStream_Read
(
stream
,
This
->
nsstream
->
buf
+
This
->
nsstream
->
buf_size
,
sizeof
(
This
->
nsstream
->
buf
)
-
This
->
nsstream
->
buf_size
,
&
read
);
if
(
!
read
)
break
;
if
(
!
This
->
bsc
.
readed
&&
This
->
nsstream
->
buf_size
>=
2
&&
*
(
WORD
*
)
This
->
nsstream
->
buf
==
0xfeff
)
{
This
->
nschannel
->
charset
=
heap_alloc
(
sizeof
(
UTF16_STR
));
memcpy
(
This
->
nschannel
->
charset
,
UTF16_STR
,
sizeof
(
UTF16_STR
));
}
This
->
nsstream
->
buf_size
+=
read
;
if
(
!
This
->
bsc
.
readed
)
{
if
(
This
->
nsstream
->
buf_size
>=
2
&&
(
BYTE
)
This
->
nsstream
->
buf
[
0
]
==
0xff
&&
(
BYTE
)
This
->
nsstream
->
buf
[
1
]
==
0xfe
)
This
->
nschannel
->
charset
=
heap_strdupA
(
UTF16_STR
);
nsres
=
nsIStreamListener_OnStartRequest
(
This
->
nslistener
,
(
nsIRequest
*
)
NSCHANNEL
(
This
->
nschannel
),
This
->
nscontext
);
if
(
NS_FAILED
(
nsres
))
...
...
@@ -905,8 +908,10 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
if
(
NS_FAILED
(
nsres
))
ERR
(
"OnDataAvailable failed: %08x
\n
"
,
nsres
);
if
(
This
->
nsstream
->
buf_size
)
FIXME
(
"buffer is not empty!
\n
"
);
if
(
This
->
nsstream
->
buf_size
==
sizeof
(
This
->
nsstream
->
buf
))
{
ERR
(
"buffer is full
\n
"
);
break
;
}
}
while
(
hres
==
S_OK
);
return
S_OK
;
...
...
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