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
8090d169
Commit
8090d169
authored
Aug 17, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Store error state separately from end of stream in chunked stream.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
752d078a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
http.c
dlls/wininet/http.c
+15
-5
No files found.
dlls/wininet/http.c
View file @
8090d169
...
...
@@ -401,7 +401,8 @@ typedef struct {
CHUNKED_STREAM_STATE_READING_CHUNK
,
CHUNKED_STREAM_STATE_DISCARD_EOL_AFTER_DATA
,
CHUNKED_STREAM_STATE_DISCARD_EOL_AT_END
,
CHUNKED_STREAM_STATE_END_OF_STREAM
CHUNKED_STREAM_STATE_END_OF_STREAM
,
CHUNKED_STREAM_STATE_ERROR
}
state
;
}
chunked_stream_t
;
...
...
@@ -2681,7 +2682,14 @@ static char next_chunked_data_char(chunked_stream_t *stream)
static
BOOL
chunked_end_of_data
(
data_stream_t
*
stream
,
http_request_t
*
req
)
{
chunked_stream_t
*
chunked_stream
=
(
chunked_stream_t
*
)
stream
;
return
chunked_stream
->
state
==
CHUNKED_STREAM_STATE_END_OF_STREAM
;
switch
(
chunked_stream
->
state
)
{
case
CHUNKED_STREAM_STATE_DISCARD_EOL_AT_END
:
case
CHUNKED_STREAM_STATE_END_OF_STREAM
:
case
CHUNKED_STREAM_STATE_ERROR
:
return
TRUE
;
default:
return
FALSE
;
}
}
static
DWORD
chunked_read
(
data_stream_t
*
stream
,
http_request_t
*
req
,
BYTE
*
buf
,
DWORD
size
,
...
...
@@ -2713,7 +2721,7 @@ static DWORD chunked_read(data_stream_t *stream, http_request_t *req, BYTE *buf,
continue_read
=
FALSE
;
continue
;
}
else
{
chunked_stream
->
state
=
CHUNKED_STREAM_STATE_E
ND_OF_STREAM
;
chunked_stream
->
state
=
CHUNKED_STREAM_STATE_E
RROR
;
}
break
;
default:
...
...
@@ -2775,7 +2783,7 @@ static DWORD chunked_read(data_stream_t *stream, http_request_t *req, BYTE *buf,
}
if
(
!
read_bytes
)
{
chunked_stream
->
state
=
CHUNKED_STREAM_STATE_E
ND_OF_STREAM
;
chunked_stream
->
state
=
CHUNKED_STREAM_STATE_E
RROR
;
continue
;
}
}
...
...
@@ -2805,6 +2813,7 @@ static DWORD chunked_read(data_stream_t *stream, http_request_t *req, BYTE *buf,
break
;
case
CHUNKED_STREAM_STATE_END_OF_STREAM
:
case
CHUNKED_STREAM_STATE_ERROR
:
continue_read
=
FALSE
;
break
;
}
...
...
@@ -2826,7 +2835,8 @@ static DWORD chunked_drain_content(data_stream_t *stream, http_request_t *req, B
BYTE
buf
[
1024
];
DWORD
size
,
res
;
while
(
chunked_stream
->
state
!=
CHUNKED_STREAM_STATE_END_OF_STREAM
)
{
while
(
chunked_stream
->
state
!=
CHUNKED_STREAM_STATE_END_OF_STREAM
&&
chunked_stream
->
state
!=
CHUNKED_STREAM_STATE_ERROR
)
{
res
=
chunked_read
(
stream
,
req
,
buf
,
sizeof
(
buf
),
&
size
,
allow_blocking
);
if
(
res
!=
ERROR_SUCCESS
)
return
res
;
...
...
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