diff --git a/kioclient/kioclient.cpp b/kioclient/kioclient.cpp --- a/kioclient/kioclient.cpp +++ b/kioclient/kioclient.cpp @@ -199,6 +199,7 @@ if ( mimeType.isEmpty() ) { KRun * run = new KRun( url, nullptr ); run->setRunExecutables(allowExec); + run->setFollowRedirections(false); QObject::connect( run, SIGNAL( finished() ), this, SLOT( delayedQuit() )); QObject::connect( run, SIGNAL( error() ), this, SLOT( delayedQuit() )); qApp->exec(); @@ -437,4 +438,3 @@ : QObject() { } - diff --git a/src/widgets/krun.cpp b/src/widgets/krun.cpp --- a/src/widgets/krun.cpp +++ b/src/widgets/krun.cpp @@ -1315,8 +1315,10 @@ KIO::TransferJob *job = qobject_cast(d->m_job); if (job) { - // Update our URL in case of a redirection - setUrl(job->url()); + if (!job->url().scheme().startsWith("http", Qt::CaseInsensitive)) { + // Update our URL in case of a redirection + setUrl(job->url()); + } job->putOnHold(); KIO::Scheduler::publishSlaveOnHold();