From 3bcd9cfe37dce502ef0aff928484f128b73fbb6e Mon Sep 17 00:00:00 2001 From: Abs62 Date: Thu, 22 Dec 2022 21:41:49 +0300 Subject: [PATCH] Websites: Fix some redirects --- website.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website.cc b/website.cc index b9952d0a..642b6d4e 100644 --- a/website.cc +++ b/website.cc @@ -200,9 +200,10 @@ void WebSiteArticleRequest::requestFinished( QNetworkReply * r ) QUrl redirectUrl = possibleRedirectUrl.toUrl(); if( !redirectUrl.isEmpty() ) { + QUrl newUrl = netReply->url().resolved( redirectUrl ); disconnect( netReply, 0, 0, 0 ); netReply->deleteLater(); - netReply = mgr.get( QNetworkRequest( redirectUrl ) ); + netReply = mgr.get( QNetworkRequest( newUrl ) ); #ifndef QT_NO_OPENSSL connect( netReply, SIGNAL( sslErrors( QList< QSslError > ) ), netReply, SLOT( ignoreSslErrors() ) );