Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
284038fb
Commit
284038fb
authored
Oct 22, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: remove internal redirection support
parent
0506fdb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
41 deletions
+4
-41
modules/access/http.c
modules/access/http.c
+4
-41
No files found.
modules/access/http.c
View file @
284038fb
...
@@ -188,10 +188,6 @@ struct access_sys_t
...
@@ -188,10 +188,6 @@ struct access_sys_t
bool
b_has_size
;
bool
b_has_size
;
};
};
/* */
static
int
OpenRedirected
(
vlc_object_t
*
p_this
,
const
char
*
psz_url
,
unsigned
i_redirect
);
/* */
/* */
static
ssize_t
Read
(
access_t
*
,
uint8_t
*
,
size_t
);
static
ssize_t
Read
(
access_t
*
,
uint8_t
*
,
size_t
);
static
ssize_t
ReadCompressed
(
access_t
*
,
uint8_t
*
,
size_t
);
static
ssize_t
ReadCompressed
(
access_t
*
,
uint8_t
*
,
size_t
);
...
@@ -216,21 +212,8 @@ static vlc_http_cookie_jar_t *GetCookieJar( vlc_object_t *p_this );
...
@@ -216,21 +212,8 @@ static vlc_http_cookie_jar_t *GetCookieJar( vlc_object_t *p_this );
static
int
Open
(
vlc_object_t
*
p_this
)
static
int
Open
(
vlc_object_t
*
p_this
)
{
{
access_t
*
p_access
=
(
access_t
*
)
p_this
;
access_t
*
p_access
=
(
access_t
*
)
p_this
;
const
char
*
psz_url
=
p_access
->
psz_url
;
return
OpenRedirected
(
p_this
,
p_access
->
psz_url
,
5
);
char
*
psz
;
}
/**
* Open the given url with limited redirects
* @param p_this: the vlc object
* @i_redirect: number of redirections remaining
* @return vlc error codes
*/
static
int
OpenRedirected
(
vlc_object_t
*
p_this
,
const
char
*
psz_url
,
unsigned
i_redirect
)
{
access_t
*
p_access
=
(
access_t
*
)
p_this
;
char
*
psz
;
access_sys_t
*
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
);
access_sys_t
*
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
);
if
(
unlikely
(
p_sys
==
NULL
)
)
if
(
unlikely
(
p_sys
==
NULL
)
)
...
@@ -459,22 +442,7 @@ connect:
...
@@ -459,22 +442,7 @@ connect:
p_sys
->
i_code
==
303
||
p_sys
->
i_code
==
307
)
&&
p_sys
->
i_code
==
303
||
p_sys
->
i_code
==
307
)
&&
p_sys
->
psz_location
&&
*
p_sys
->
psz_location
)
p_sys
->
psz_location
&&
*
p_sys
->
psz_location
)
{
{
msg_Dbg
(
p_access
,
"redirection to %s"
,
p_sys
->
psz_location
);
p_access
->
psz_url
=
p_sys
->
psz_location
;
/* Check the number of redirection already done */
if
(
i_redirect
==
0
)
{
msg_Err
(
p_access
,
"Too many redirection: break potential infinite"
"loop"
);
goto
error
;
}
if
(
strncmp
(
p_sys
->
psz_location
,
"http://"
,
7
)
&&
strncmp
(
p_sys
->
psz_location
,
"https://"
,
8
)
)
{
/* Do not accept redirection outside of HTTP */
msg_Err
(
p_access
,
"unsupported redirection ignored"
);
goto
error
;
}
/* Clean up current Open() run */
/* Clean up current Open() run */
vlc_UrlClean
(
&
p_sys
->
url
);
vlc_UrlClean
(
&
p_sys
->
url
);
...
@@ -493,13 +461,8 @@ connect:
...
@@ -493,13 +461,8 @@ connect:
#ifdef HAVE_ZLIB_H
#ifdef HAVE_ZLIB_H
inflateEnd
(
&
p_sys
->
inflate
.
stream
);
inflateEnd
(
&
p_sys
->
inflate
.
stream
);
#endif
#endif
char
*
psz_location
=
p_sys
->
psz_location
;
free
(
p_sys
);
free
(
p_sys
);
return
VLC_ACCESS_REDIRECT
;
/* Do new Open() run with new data */
int
ret
=
OpenRedirected
(
p_this
,
psz_location
,
i_redirect
-
1
);
free
(
psz_location
);
return
ret
;
}
}
if
(
p_sys
->
b_mms
)
if
(
p_sys
->
b_mms
)
...
...
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