Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
35127bf1
Commit
35127bf1
authored
Jun 17, 2012
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: Properly handle chunked transfer-encoding for replies to post data
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
eb564b23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
http.c
libavformat/http.c
+6
-9
No files found.
libavformat/http.c
View file @
35127bf1
...
...
@@ -353,6 +353,8 @@ static int http_read_header(URLContext *h, int *new_location)
char
line
[
1024
];
int
err
=
0
;
s
->
chunksize
=
-
1
;
for
(;;)
{
if
((
err
=
http_get_line
(
s
,
line
,
sizeof
(
line
)))
<
0
)
return
err
;
...
...
@@ -470,7 +472,6 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
s
->
http_code
=
200
;
return
0
;
}
s
->
chunksize
=
-
1
;
/* wait for header */
err
=
http_read_header
(
h
,
new_location
);
...
...
@@ -513,14 +514,10 @@ static int http_read(URLContext *h, uint8_t *buf, int size)
if
(
!
s
->
hd
)
return
AVERROR_EOF
;
if
(
s
->
end_chunked_post
)
{
if
(
!
s
->
end_header
)
{
err
=
http_read_header
(
h
,
&
new_location
);
if
(
err
<
0
)
return
err
;
}
return
http_buf_read
(
h
,
buf
,
size
);
if
(
s
->
end_chunked_post
&&
!
s
->
end_header
)
{
err
=
http_read_header
(
h
,
&
new_location
);
if
(
err
<
0
)
return
err
;
}
if
(
s
->
chunksize
>=
0
)
{
...
...
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