Commit 8dcc9704 authored by Christophe Mutricy's avatar Christophe Mutricy

Only rewrite the URI if it's a permanent redirection. Thanks to Sebastian...

Only rewrite the URI if it's a permanent redirection. Thanks to Sebastian Wiedenroth for the patch + some modification by me. Fix #1408
parent 53dfe76b
......@@ -330,19 +330,20 @@ connect:
msg_Err( p_access, "insecure redirection ignored" );
goto error;
}
if( p_sys->i_code == 301 )
{
/* Permanent redirection: Change the URI */
p_playlist = pl_Yield( p_access );
PL_LOCK;
/* Change the URI */
p_playlist = pl_Yield( p_access );
PL_LOCK;
p_input_item = p_playlist->status.p_item->p_input;
input_item_SetURI( p_input_item, p_sys->psz_location );
p_input_item = p_playlist->status.p_item->p_input;
input_item_SetURI( p_input_item, p_sys->psz_location );
PL_UNLOCK;
pl_Release( p_access );
}
free( p_access->psz_path );
p_access->psz_path = strdup( p_sys->psz_location );
PL_UNLOCK;
pl_Release( p_access );
/* Clean up current Open() run */
vlc_UrlClean( &p_sys->url );
vlc_UrlClean( &p_sys->proxy );
......
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