[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

ap at apple.com ap at apple.com
Wed Dec 22 12:24:25 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit d7d4522ea786a879f5b565fa0780f4da9eae028a
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Aug 21 05:06:10 2010 +0000

    2010-08-20  Alexey Proskuryakov  <ap at apple.com>
    
            Reviewed by Brady Eidson.
    
            https://bugs.webkit.org/show_bug.cgi?id=38428
            HTTP code 500 (and other non-4xx codes) wrongfully treated as success for subresources
    
            * http/tests/misc/resources/script-500.php: Added.
            * http/tests/misc/script-500-expected.txt: Added.
            * http/tests/misc/script-500.html: Added.
    2010-08-20  Alexey Proskuryakov  <ap at apple.com>
    
            Reviewed by Brady Eidson.
    
            https://bugs.webkit.org/show_bug.cgi?id=38428
            HTTP code 500 (and other non-4xx codes) wrongfully treated as success for subresources
    
            Test: http/tests/misc/script-500.html
    
            * loader/loader.cpp: (WebCore::Loader::Host::didReceiveData): Treat all HTTP codes >= 400 as
            error ones, since they are.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65774 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6ae61ba..d82c0f3 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-20  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Brady Eidson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=38428
+        HTTP code 500 (and other non-4xx codes) wrongfully treated as success for subresources
+
+        * http/tests/misc/resources/script-500.php: Added.
+        * http/tests/misc/script-500-expected.txt: Added.
+        * http/tests/misc/script-500.html: Added.
+
 2010-08-20  Ademar de Souza Reis Jr  <ademar.reis at openbossa.org>
 
         Reviewed by Ariya Hidayat.
diff --git a/LayoutTests/http/tests/misc/resources/script-500.php b/LayoutTests/http/tests/misc/resources/script-500.php
new file mode 100644
index 0000000..8f816f9
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/script-500.php
@@ -0,0 +1,4 @@
+<?php
+header('HTTP/1.1 500 Internal Server Error');
+?>
+document.getElementById('result').innerHTML = 'FAIL';
diff --git a/LayoutTests/http/tests/misc/script-500-expected.txt b/LayoutTests/http/tests/misc/script-500-expected.txt
new file mode 100644
index 0000000..bec02a2
--- /dev/null
+++ b/LayoutTests/http/tests/misc/script-500-expected.txt
@@ -0,0 +1,2 @@
+Test that onerror fires for a script with HTTP status 500.
+PASS
diff --git a/LayoutTests/http/tests/misc/script-500.html b/LayoutTests/http/tests/misc/script-500.html
new file mode 100644
index 0000000..1e123e8
--- /dev/null
+++ b/LayoutTests/http/tests/misc/script-500.html
@@ -0,0 +1,11 @@
+<html>
+<body>
+<div>Test that onerror fires for a script with HTTP status 500.</div>
+<div id=result>Testing...</div>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+</script>
+<script onerror="document.getElementById('result').innerHTML = 'PASS';" src="resources/script-500.php" type="text/javascript"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 75cb008..45f623c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-20  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by Brady Eidson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=38428
+        HTTP code 500 (and other non-4xx codes) wrongfully treated as success for subresources
+
+        Test: http/tests/misc/script-500.html
+
+        * loader/loader.cpp: (WebCore::Loader::Host::didReceiveData): Treat all HTTP codes >= 400 as
+        error ones, since they are.
+
 2010-08-20  Tony Gentilcore  <tonyg at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/loader/loader.cpp b/WebCore/loader/loader.cpp
index 230d6ea..7263fc1 100644
--- a/WebCore/loader/loader.cpp
+++ b/WebCore/loader/loader.cpp
@@ -551,9 +551,7 @@ void Loader::Host::didReceiveData(SubresourceLoader* loader, const char* data, i
     if (resource->errorOccurred())
         return;
         
-    if (resource->response().httpStatusCode() / 100 == 4) {
-        // Treat a 4xx response like a network error for all resources but images (which will ignore the error and continue to load for 
-        // legacy compatibility).
+    if (resource->response().httpStatusCode() >= 400) {
         resource->httpStatusCodeError();
         return;
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list