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
b4eb1f29
Commit
b4eb1f29
authored
Dec 27, 2015
by
Joel Holdsworth
Committed by
Michael Niedermayer
Dec 27, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/http: Added http_proxy option
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
1809894b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
http.c
libavformat/http.c
+3
-1
No files found.
libavformat/http.c
View file @
b4eb1f29
...
...
@@ -67,6 +67,7 @@ typedef struct HTTPContext {
char
*
location
;
HTTPAuthState
auth_state
;
HTTPAuthState
proxy_auth_state
;
char
*
http_proxy
;
char
*
headers
;
char
*
mime_type
;
char
*
user_agent
;
...
...
@@ -126,6 +127,7 @@ typedef struct HTTPContext {
static
const
AVOption
options
[]
=
{
{
"seekable"
,
"control seekability of connection"
,
OFFSET
(
seekable
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
-
1
},
-
1
,
1
,
D
},
{
"chunked_post"
,
"use chunked transfer-encoding for posts"
,
OFFSET
(
chunked_post
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
1
},
0
,
1
,
E
},
{
"http_proxy"
,
"set HTTP proxy to tunnel through"
,
OFFSET
(
http_proxy
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
0
,
0
,
D
|
E
},
{
"headers"
,
"set custom HTTP headers, can override built in default headers"
,
OFFSET
(
headers
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
0
,
0
,
D
|
E
},
{
"content_type"
,
"set a specific content type for the POST messages"
,
OFFSET
(
content_type
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
0
,
0
,
D
|
E
},
{
"user_agent"
,
"override User-Agent header"
,
OFFSET
(
user_agent
),
AV_OPT_TYPE_STRING
,
{
.
str
=
DEFAULT_USER_AGENT
},
0
,
0
,
D
},
...
...
@@ -186,7 +188,7 @@ static int http_open_cnx_internal(URLContext *h, AVDictionary **options)
path1
,
sizeof
(
path1
),
s
->
location
);
ff_url_join
(
hoststr
,
sizeof
(
hoststr
),
NULL
,
NULL
,
hostname
,
port
,
NULL
);
proxy_path
=
getenv
(
"http_proxy"
);
proxy_path
=
s
->
http_proxy
?
s
->
http_proxy
:
getenv
(
"http_proxy"
);
use_proxy
=
!
ff_http_match_no_proxy
(
getenv
(
"no_proxy"
),
hostname
)
&&
proxy_path
&&
av_strstart
(
proxy_path
,
"http://"
,
NULL
);
...
...
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