Title: [117071] trunk
Revision
117071
Author
[email protected]
Date
2012-05-15 08:34:09 -0700 (Tue, 15 May 2012)

Log Message

[Qt] http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html times out
https://bugs.webkit.org/show_bug.cgi?id=84016

Reviewed by Simon Hausmann.

Source/WebCore:

Calling didFail abort the connection and doesn't activate the HEADERS_RECEIVED state.
Since the goal of HEAD is to test then the request should be marked as finished
also in cases of HTTP errors.
This matches other ports behavior.

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

LayoutTests:

* platform/qt/Skipped:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (117070 => 117071)


--- trunk/LayoutTests/ChangeLog	2012-05-15 15:15:51 UTC (rev 117070)
+++ trunk/LayoutTests/ChangeLog	2012-05-15 15:34:09 UTC (rev 117071)
@@ -1,3 +1,12 @@
+2012-05-15  Jocelyn Turcotte  <[email protected]>
+
+        [Qt] http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html times out
+        https://bugs.webkit.org/show_bug.cgi?id=84016
+
+        Reviewed by Simon Hausmann.
+
+        * platform/qt/Skipped:
+
 2012-05-15  Dinu Jacob  <[email protected]>
 
         [Qt][WK2] fast/loader/create-frame-in-DOMContentLoaded.html crashes

Modified: trunk/LayoutTests/platform/qt/Skipped (117070 => 117071)


--- trunk/LayoutTests/platform/qt/Skipped	2012-05-15 15:15:51 UTC (rev 117070)
+++ trunk/LayoutTests/platform/qt/Skipped	2012-05-15 15:34:09 UTC (rev 117071)
@@ -652,10 +652,6 @@
 # https://bugs.webkit.org/show_bug.cgi?id=72252
 http/tests/misc/xslt-bad-import.html
 
-# [Qt] http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html times out
-# https://bugs.webkit.org/show_bug.cgi?id=84016
-http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html
-
 # =========================================================================== #
 #       Failing xmlhttprequest tests                                          #
 # =========================================================================== #

Modified: trunk/Source/WebCore/ChangeLog (117070 => 117071)


--- trunk/Source/WebCore/ChangeLog	2012-05-15 15:15:51 UTC (rev 117070)
+++ trunk/Source/WebCore/ChangeLog	2012-05-15 15:34:09 UTC (rev 117071)
@@ -1,3 +1,18 @@
+2012-05-15  Jocelyn Turcotte  <[email protected]>
+
+        [Qt] http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html times out
+        https://bugs.webkit.org/show_bug.cgi?id=84016
+
+        Reviewed by Simon Hausmann.
+
+        Calling didFail abort the connection and doesn't activate the HEADERS_RECEIVED state.
+        Since the goal of HEAD is to test then the request should be marked as finished
+        also in cases of HTTP errors.
+        This matches other ports behavior.
+
+        * platform/network/qt/QNetworkReplyHandler.cpp:
+        (WebCore::shouldIgnoreHttpError):
+
 2012-05-15  Allan Sandfeld Jensen  <[email protected]>
 
         [Qt][WK2] Fix scrolling in touch mode

Modified: trunk/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp (117070 => 117071)


--- trunk/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp	2012-05-15 15:15:51 UTC (rev 117070)
+++ trunk/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp	2012-05-15 15:34:09 UTC (rev 117071)
@@ -420,6 +420,10 @@
 
 static bool shouldIgnoreHttpError(QNetworkReply* reply, bool receivedData)
 {
+    // An HEAD XmlHTTPRequest shouldn't be marked as failure for HTTP errors.
+    if (reply->operation() == QNetworkAccessManager::HeadOperation)
+        return true;
+
     int httpStatusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
 
     if (httpStatusCode == 401 || httpStatusCode == 407)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to