Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
14ad3ab7
Commit
14ad3ab7
authored
May 06, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* http: fix 'add mrl'.
parent
a7494394
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
modules/control/http.c
modules/control/http.c
+38
-1
No files found.
modules/control/http.c
View file @
14ad3ab7
...
...
@@ -2,7 +2,7 @@
* http.c : http remote control plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: http.c,v 1.
2 2003/04/27 00:02:27 gbazin
Exp $
* $Id: http.c,v 1.
3 2003/05/06 12:57:48 fenrir
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -298,6 +298,42 @@ static void uri_extract_value( char *psz_uri, char *psz_name,
}
}
static
void
uri_decode_url_encoded
(
char
*
psz
)
{
char
*
dup
=
strdup
(
psz
);
char
*
p
=
dup
;
while
(
*
p
)
{
if
(
*
p
==
'%'
)
{
char
val
[
3
];
p
++
;
if
(
!*
p
)
{
break
;
}
val
[
0
]
=
*
p
++
;
val
[
1
]
=
*
p
++
;
val
[
2
]
=
'\0'
;
*
psz
++
=
strtol
(
val
,
NULL
,
16
);
}
else
if
(
*
p
==
'+'
)
{
*
psz
++
=
' '
;
p
++
;
}
else
{
*
psz
++
=
*
p
++
;
}
}
*
psz
++
=
'\0'
;
free
(
dup
);
}
static
int
httpd_page_interface_get
(
httpd_file_callback_args_t
*
p_args
,
uint8_t
*
p_request
,
int
i_request
,
uint8_t
**
pp_data
,
int
*
pi_data
)
...
...
@@ -351,6 +387,7 @@ static int httpd_page_interface_get( httpd_file_callback_args_t *p_args,
else
if
(
!
strcmp
(
action
,
"add"
)
)
{
uri_extract_value
(
p_request
,
"mrl"
,
action
,
512
);
uri_decode_url_encoded
(
action
);
playlist_Add
(
p_playlist
,
action
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
msg_Dbg
(
p_intf
,
"requested playlist add: %s"
,
action
);
...
...
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