]> git.sesse.net Git - vlc/commitdiff
* http.c: fixed bug with spaces in mrl
authorSimon Latapie <garf@videolan.org>
Mon, 17 Nov 2003 15:29:03 +0000 (15:29 +0000)
committerSimon Latapie <garf@videolan.org>
Mon, 17 Nov 2003 15:29:03 +0000 (15:29 +0000)
modules/control/http.c

index 4235800686630d8dcd4ef860cbe0eed2f72adbeb..f76e53b9f443119ecf8201b5ff1677be9517b9bf 100644 (file)
@@ -2,7 +2,7 @@
  * http.c :  http mini-server ;)
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
  * http.c :  http mini-server ;)
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: http.c,v 1.34 2003/11/16 20:41:36 garf Exp $
+ * $Id: http.c,v 1.35 2003/11/17 15:29:03 garf Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *          Laurent Aimar <fenrir@via.ecp.fr>
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *          Laurent Aimar <fenrir@via.ecp.fr>
@@ -2878,11 +2878,17 @@ playlist_item_t * parse_MRL( char *psz )
     }
 
     /* extract the mrl */
     }
 
     /* extract the mrl */
-    s_temp = Find_end_MRL( s_mrl );
-
+    s_temp = strstr( s_mrl , " :" );
     if( s_temp == NULL )
     {
     if( s_temp == NULL )
     {
-        return NULL;
+        s_temp = s_mrl + strlen( s_mrl );
+    } else
+    {
+        while( (*s_temp == ' ') && (s_temp != s_mrl ) )
+        {
+            s_temp--;
+        }
+        s_temp++;
     }
 
     /* if the mrl is between " or ', we must remove them */
     }
 
     /* if the mrl is between " or ', we must remove them */