Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
14ad3ab7
Commit
14ad3ab7
authored
May 06, 2003
by
Laurent Aimar
Browse files
* http: fix 'add mrl'.
parent
a7494394
Changes
1
Hide whitespace changes
Inline
Side-by-side
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/0
4/27 00:02:27 gbazin
Exp $
* $Id: http.c,v 1.
3
2003/0
5/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
Supports
Markdown
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