diff options
| author | Mike Skec <skec@protonmail.ch> | 2020-12-26 16:55:43 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2020-12-26 10:27:55 +0100 |
| commit | 06b254d686a9fbed702e8d1777dc5c7adcba1fbe (patch) | |
| tree | 30d7bc7a3aea933d24d54964b46147663341769b /src/browsertab.cpp | |
| parent | 865da65915f714c1473688d70878c00511e232f6 (diff) | |
| download | kristall-06b254d686a9fbed702e8d1777dc5c7adcba1fbe.tar.gz | |
Fix #79. Also added Ctrl+U shortcut for 'View page source'
Diffstat (limited to 'src/browsertab.cpp')
| -rw-r--r-- | src/browsertab.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp index 136a01f..1180f11 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -668,12 +668,19 @@ void BrowserTab::on_inputRequired(const QString &query, const bool is_sensitive) } } -void BrowserTab::on_redirected(const QUrl &uri, bool is_permanent) +void BrowserTab::on_redirected(QUrl uri, bool is_permanent) { Q_UNUSED(is_permanent); this->network_timeout_timer.stop(); + // #79: Handle non-full url redirects + if (uri.isRelative()) + { + uri.setScheme(current_location.scheme()); + uri.setHost(current_location.host()); + } + if (redirection_count >= kristall::options.max_redirections) { setErrorMessage(QString("Too many consecutive redirections. The last redirection would have redirected you to:\r\n%1").arg(uri.toString(QUrl::FullyEncoded))); |
