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
28df1d24
Commit
28df1d24
authored
Jul 17, 2014
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: Provide an option to override the HTTP method
Certain servers accept only PUT as valid method.
parent
bb0babd7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
http.c
libavformat/http.c
+7
-1
No files found.
libavformat/http.c
View file @
28df1d24
...
...
@@ -85,6 +85,7 @@ typedef struct {
#endif
AVDictionary
*
chained_options
;
int
send_expect_100
;
char
*
method
;
}
HTTPContext
;
#define OFFSET(x) offsetof(HTTPContext, x)
...
...
@@ -110,6 +111,7 @@ static const AVOption options[] = {
{
"location"
,
"The actual location of the data received"
,
OFFSET
(
location
),
AV_OPT_TYPE_STRING
,
{
0
},
0
,
0
,
D
|
E
},
{
"offset"
,
"initial byte offset"
,
OFFSET
(
off
),
AV_OPT_TYPE_INT64
,
{.
i64
=
0
},
0
,
INT64_MAX
,
D
},
{
"end_offset"
,
"try to limit the request to bytes preceding this offset"
,
OFFSET
(
end_off
),
AV_OPT_TYPE_INT64
,
{.
i64
=
0
},
0
,
INT64_MAX
,
D
},
{
"method"
,
"Override the HTTP method"
,
OFFSET
(
method
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
0
,
0
,
E
,
},
{
NULL
}
};
#define HTTP_CLASS(flavor)\
...
...
@@ -555,7 +557,11 @@ static int http_connect(URLContext *h, const char *path, const char *local_path,
s
->
chunked_post
=
0
;
}
method
=
post
?
"POST"
:
"GET"
;
if
(
s
->
method
)
method
=
s
->
method
;
else
method
=
post
?
"POST"
:
"GET"
;
authstr
=
ff_http_auth_create_response
(
&
s
->
auth_state
,
auth
,
local_path
,
method
);
proxyauthstr
=
ff_http_auth_create_response
(
&
s
->
proxy_auth_state
,
proxyauth
,
...
...
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