[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kwebkitpart] src
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2011-01-23 6:37:14
Message-ID: 20110123063714.1265CA6092 () git ! kde ! org
[Download RAW message or body]
Git commit 5aba36c866a089fb9dfee1b4545accdd9dd964e9 by Dawit Alemayehu
Pushed by adawit into branch master
Handle redirections properly. Not all 3XX status code is a redirection request!
M +4 -4 src/webpage.cpp
http://commits.kde.org/d457ee94/5aba36c866a089fb9dfee1b4545accdd9dd964e9
diff --git a/src/webpage.cpp b/src/webpage.cpp
index f318152..6e9467d 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -443,9 +443,9 @@ void WebPage::slotRequestFinished(QNetworkReply *reply)
if (!frame)
return;
- const int statusCode = \
reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); \
- // Only deal with non-redirect responses...
- if (statusCode > 299 && statusCode < 400) {
+ // Only deal with non-redirect responses...
+ const QVariant redirectVar = \
reply->attribute(QNetworkRequest::RedirectionTargetAttribute); + if \
(redirectVar.isValid()) {
m_sslInfo.restoreFrom(reply->attribute(static_cast<QNetworkRequest::Attribute>(KIO::AccessManager::MetaData)),
reply->url());
return;
@@ -761,7 +761,7 @@ bool NewWindowPage::acceptNavigationRequest(QWebFrame *frame, \
const QNetworkRequ
WebView* webView = webkitPart ? qobject_cast<WebView*>(webkitPart->view()) : \
0; if (webView) {
// Stop the page loading...
- webView->triggerPageAction(QWebPage::Stop, true);
+ //webView->triggerPageAction(QWebPage::Stop, true);
// Switch the page this one. NOTE: this will delete the previous
// page if its parent is the webView...
webView->setPage(this);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic