[Qt] Redirection overflow errors have wrong error domain
authorjesus@webkit.org <jesus@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2011 12:43:32 +0000 (12:43 +0000)
committerjesus@webkit.org <jesus@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Sep 2011 12:43:32 +0000 (12:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68612

Reviewed by Andreas Kling.

Source/WebCore:

Redirection overflow currently puts the URL hostname in the errorDomain field.
Now redirection overflow errors will be classified as "HTTP" errors.

* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyHandler::redirect):

Source/WebKit2:

Redirection overflow currently puts the URL hostname in the errorDomain field
and therefore are treated as a QWebError::EngineError. From now on they
will be treated as QWebError::HttpError, since their error domain was modified
to "HTTP" in QNetworkReplyHandler::redirect().

* UIProcess/API/qt/qweberror.cpp:
(QWebError::type):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95710 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qweberror.cpp

index c6307ec..e3650f8 100644 (file)
@@ -1,3 +1,16 @@
+2011-09-22  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
+
+        [Qt] Redirection overflow errors have wrong error domain
+        https://bugs.webkit.org/show_bug.cgi?id=68612
+
+        Reviewed by Andreas Kling.
+
+        Redirection overflow currently puts the URL hostname in the errorDomain field.
+        Now redirection overflow errors will be classified as "HTTP" errors.
+
+        * platform/network/qt/QNetworkReplyHandler.cpp:
+        (WebCore::QNetworkReplyHandler::redirect):
+
 2011-09-22  James Robinson  <jamesr@chromium.org>
 
         Unreviewed, rolling out r95699.
index 5af0049..f72ee26 100644 (file)
@@ -528,7 +528,7 @@ void QNetworkReplyHandler::redirect(ResourceResponse& response, const QUrl& redi
 
     m_redirectionTries--;
     if (!m_redirectionTries) {
-        ResourceError error(newUrl.host(), 400 /*bad request*/,
+        ResourceError error("HTTP", 400 /*bad request*/,
                             newUrl.toString(),
                             QCoreApplication::translate("QWebPage", "Redirection limit reached"));
         client->didFail(m_resourceHandle, error);
index e582a5c..1b9e3d9 100644 (file)
@@ -1,3 +1,18 @@
+2011-09-22  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
+
+        [Qt] Redirection overflow errors have wrong error domain
+        https://bugs.webkit.org/show_bug.cgi?id=68612
+
+        Reviewed by Andreas Kling.
+
+        Redirection overflow currently puts the URL hostname in the errorDomain field
+        and therefore are treated as a QWebError::EngineError. From now on they
+        will be treated as QWebError::HttpError, since their error domain was modified
+        to "HTTP" in QNetworkReplyHandler::redirect().
+
+        * UIProcess/API/qt/qweberror.cpp:
+        (QWebError::type):
+
 2011-09-22  Csaba Osztrogonác  <ossy@webkit.org>
 
         REGRESSION(r95679): It broke everything.
index fd908a6..a5f8d98 100644 (file)
@@ -67,8 +67,6 @@ QWebError::Type QWebError::type() const
         return QWebError::HttpError;
     if (errorDomain == "Download")
         return QWebError::DownloadError;
-    // FIXME: Redirection overflow currently puts the URL hostname in the errorDomain field.
-    //        We should expose that error somehow. Source is QNetworkReplyHandler::redirect().
     return QWebError::EngineError;
 }