Commit 96cfd5c6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Sort of handle ;type= in FTP URLs

(cherry picked from commit 0772c250)
parent 1ee21307
...@@ -302,11 +302,19 @@ static int parseURL( vlc_url_t *url, const char *path ) ...@@ -302,11 +302,19 @@ static int parseURL( vlc_url_t *url, const char *path )
if( url->i_port <= 0 ) if( url->i_port <= 0 )
url->i_port = IPPORT_FTP; /* default port */ url->i_port = IPPORT_FTP; /* default port */
/* FTP URLs are relative to user's default directory (RFC1738) /* FTP URLs are relative to user's default directory (RFC1738 §3.2)
For absolute path use ftp://foo.bar//usr/local/etc/filename */ For absolute path use ftp://foo.bar//usr/local/etc/filename */
/* FIXME: we should issue a series of CWD, one per slash */
if( url->psz_path && *url->psz_path == '/' ) if( url->psz_path && *url->psz_path == '/' )
url->psz_path++; url->psz_path++;
char *type = strstr( url->psz_path, ";type=" );
if( type )
{
*type = '\0';
if( strchr( "iI", type[6] ) == NULL )
return VLC_EGENERIC; /* ASCII and directory not supported */
}
decode_URI( url->psz_path ); decode_URI( url->psz_path );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment