Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
ef7a981f
Commit
ef7a981f
authored
Nov 12, 2010
by
Jonas Gehring
Committed by
Jean-Baptiste Kempf
Nov 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add http-referrer option to HTTP access module
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
2afaacab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
modules/access/http.c
modules/access/http.c
+17
-0
No files found.
modules/access/http.c
View file @
ef7a981f
...
...
@@ -119,6 +119,8 @@ vlc_module_begin ()
add_integer
(
"http-caching"
,
4
*
DEFAULT_PTS_DELAY
/
1000
,
CACHING_TEXT
,
CACHING_LONGTEXT
,
true
)
change_safe
()
add_string
(
"http-referrer"
,
NULL
,
NULL
,
NULL
,
false
)
change_safe
()
add_string
(
"http-user-agent"
,
NULL
,
NULL
,
NULL
,
false
)
change_safe
()
change_private
()
...
...
@@ -156,6 +158,7 @@ struct access_sys_t
/* From uri */
vlc_url_t
url
;
char
*
psz_user_agent
;
char
*
psz_referrer
;
http_auth_t
auth
;
/* Proxy */
...
...
@@ -281,6 +284,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
p_sys
->
b_icecast
=
false
;
p_sys
->
psz_location
=
NULL
;
p_sys
->
psz_user_agent
=
NULL
;
p_sys
->
psz_referrer
=
NULL
;
p_sys
->
b_pace_control
=
true
;
p_sys
->
b_ssl
=
false
;
#ifdef HAVE_ZLIB_H
...
...
@@ -350,6 +354,9 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
}
}
/* HTTP referrer */
p_sys
->
psz_referrer
=
var_InheritString
(
p_access
,
"http-referrer"
);
/* Check proxy */
psz
=
var_InheritString
(
p_access
,
"http-proxy"
);
if
(
psz
)
...
...
@@ -596,6 +603,7 @@ connect:
free
(
p_sys
->
psz_pragma
);
free
(
p_sys
->
psz_location
);
free
(
p_sys
->
psz_user_agent
);
free
(
p_sys
->
psz_referrer
);
Disconnect
(
p_access
);
cookies
=
p_sys
->
cookies
;
...
...
@@ -690,6 +698,7 @@ error:
free
(
p_sys
->
psz_pragma
);
free
(
p_sys
->
psz_location
);
free
(
p_sys
->
psz_user_agent
);
free
(
p_sys
->
psz_referrer
);
Disconnect
(
p_access
);
...
...
@@ -730,6 +739,7 @@ static void Close( vlc_object_t *p_this )
free
(
p_sys
->
psz_icy_title
);
free
(
p_sys
->
psz_user_agent
);
free
(
p_sys
->
psz_referrer
);
Disconnect
(
p_access
);
...
...
@@ -1275,6 +1285,13 @@ static int Request( access_t *p_access, uint64_t i_tell )
net_Printf
(
p_access
,
p_sys
->
fd
,
pvs
,
"User-Agent: %s
\r\n
"
,
p_sys
->
psz_user_agent
);
/* Referrer */
if
(
p_sys
->
psz_referrer
)
{
net_Printf
(
p_access
,
p_sys
->
fd
,
pvs
,
"Referer: %s
\r\n
"
,
p_sys
->
psz_referrer
);
}
/* Offset */
if
(
p_sys
->
i_version
==
1
&&
!
p_sys
->
b_continuous
)
{
...
...
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