[vlc-devel] commit: HTTP remote control interface cuts long urls (Miguel Angel Terol )
git version control
git at videolan.org
Sun Aug 31 14:23:32 CEST 2008
vlc | branch: 0.8.6-bugfix | Miguel Angel Terol <ma.terol at gmail.com> | Sun Aug 31 14:05:03 2008 +0200| [58b0f0fe6a5c0b342961674095b1ea19be6ebbac] | committer: Rémi Denis-Courmont
HTTP remote control interface cuts long urls
I have a problem with the "HTTP remote control interface". I use this
interface to transcode videos and the my urls are longer than 512
charaters and the actual code cut them. I solved my problem with the
attached patch but I don't know if this solution is the best to resolve
this error.
Signed-off-by: Rémi Denis-Courmont <rdenis at simphalempin.com>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58b0f0fe6a5c0b342961674095b1ea19be6ebbac
---
modules/control/http/rpn.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/modules/control/http/rpn.c b/modules/control/http/rpn.c
index 8a4af19..60613d8 100644
--- a/modules/control/http/rpn.c
+++ b/modules/control/http/rpn.c
@@ -2,7 +2,7 @@
* rpn.c : RPN evaluator for the HTTP Interface
*****************************************************************************
* Copyright (C) 2001-2006 the VideoLAN team
- * $Id$
+ * $Id: 8a4af19cfbc8437359576d3812d39147e994ae40 $
*
* Authors: Gildas Bazin <gbazin at netcourrier.com>
* Laurent Aimar <fenrir at via.ecp.fr>
@@ -351,15 +351,19 @@ void E_(EvaluateRPN)( intf_thread_t *p_intf, mvar_t *vars,
{
char *url = E_(mvar_GetValue)( vars, "url_value" );
char *name = E_(SSPop)( st );
- char value[512];
+ char *value;
char *tmp;
+ int len;
- E_(ExtractURIValue)( url, name, value, 512 );
+ len = strlen(url);
+ value = malloc(len + 1);
+ E_(ExtractURIValue)( url, name, value, len );
decode_URI( value );
tmp = E_(FromUTF8)( p_intf, value );
E_(SSPush)( st, tmp );
free( tmp );
free( name );
+ free( value );
}
else if( !strcmp( s, "url_encode" ) )
{
More information about the vlc-devel
mailing list