mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
Set redirect path to '/' if its empty, carry-over Accept-Language if set
This commit is contained in:
@@ -96,7 +96,14 @@ NetworkReply::metaDataChanged()
|
||||
}
|
||||
else
|
||||
{
|
||||
load( redir.toUrl() );
|
||||
QUrl url = redir.toUrl();
|
||||
if (url.path().isEmpty())
|
||||
{
|
||||
//Default cookie jar gets confused if path is empty
|
||||
url.setPath("/");
|
||||
}
|
||||
|
||||
load( url );
|
||||
}
|
||||
emit redirected();
|
||||
}
|
||||
@@ -153,6 +160,10 @@ NetworkReply::load( const QUrl& url )
|
||||
{
|
||||
request.setRawHeader( "User-Agent", m_reply->request().rawHeader( "User-Agent" ) );
|
||||
}
|
||||
if ( m_reply->request().hasRawHeader( "Accept-Language" ))
|
||||
{
|
||||
request.setRawHeader( "Accept-Language", m_reply->request().rawHeader( "Accept-Language" ) );
|
||||
}
|
||||
|
||||
Q_ASSERT( Tomahawk::Utils::nam() != 0 );
|
||||
|
||||
|
Reference in New Issue
Block a user