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
e5773d8b
Commit
e5773d8b
authored
May 21, 2012
by
Samuel Pitoiset
Committed by
Martin Storsjö
May 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: Add support for reading http POST reply headers
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
ba354a8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
http.c
libavformat/http.c
+15
-1
No files found.
libavformat/http.c
View file @
e5773d8b
...
...
@@ -52,6 +52,7 @@ typedef struct {
int
willclose
;
/**< Set if the server correctly handles Connection: close and will close the connection after feeding us the content. */
int
chunked_post
;
int
end_chunked_post
;
/**< A flag which indicates if the end of chunked encoding has been sent. */
int
end_header
;
/**< A flag which indicates we have finished to read POST reply. */
}
HTTPContext
;
#define OFFSET(x) offsetof(HTTPContext, x)
...
...
@@ -249,8 +250,10 @@ static int process_line(URLContext *h, char *line, int line_count,
char
*
tag
,
*
p
,
*
end
;
/* end of header */
if
(
line
[
0
]
==
'\0'
)
if
(
line
[
0
]
==
'\0'
)
{
s
->
end_header
=
1
;
return
0
;
}
p
=
line
;
if
(
line_count
==
0
)
{
...
...
@@ -462,6 +465,17 @@ static int http_buf_read(URLContext *h, uint8_t *buf, int size)
static
int
http_read
(
URLContext
*
h
,
uint8_t
*
buf
,
int
size
)
{
HTTPContext
*
s
=
h
->
priv_data
;
int
err
,
new_location
;
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
->
chunksize
>=
0
)
{
if
(
!
s
->
chunksize
)
{
...
...
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