[webkit-reviews] review denied: [Bug 22475] REGRESSION: Async XMLHttpRequest never finishes on nonexistent files anymore : [Attachment 28839] Updated version: Made the test more reliable, fake the load for file:// URL to cover all cases

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 23 00:34:12 PDT 2009


Alexey Proskuryakov <ap at webkit.org> has denied Julien Chaffraix
<jchaffraix at webkit.org>'s request for review:
Bug 22475: REGRESSION: Async XMLHttpRequest never finishes on nonexistent files
anymore
https://bugs.webkit.org/show_bug.cgi?id=22475

Attachment 28839: Updated version: Made the test more reliable, fake the load
for file:// URL to cover all cases
https://bugs.webkit.org/attachment.cgi?id=28839&action=review

------- Additional Comments from Alexey Proskuryakov <ap at webkit.org>
> +    // For compatibility we fake a correct load when the XHR is issued from
a file:// URL in error (see bug 22475).
> +    if (scriptExecutionContext()->url().isLocalFile()) {

I don't think that this is right. We should do this when the request is sent
from an HTTP URL, too. In Safari 3, this immediately raised a permission denied
exception, but now we implement cross-origin XHR, so it should work just like
in Firefox 3.1 beta.

I tested, and a request from http to a non-existent domain also results in
reaching the final state in Firefox.

Also, note this comment in genericError():

    // The spec says we should "Synchronously switch the state to DONE." and
then "Synchronously dispatch a readystatechange event on the object"
    // but this does not match Firefox.

What exactly about this behavior doesn't match Firefox? Maybe the comment is
wrong, and the new code should be in genericError(), and not in didFail()?

+		 xhr.open("GET", "http://non.existent.domain.in.the.web.org",
true);

I usually send requests to 127.0.0.1:7 to simulate a host that doesn't have an
HTTP server in such tests - this avoids the need to hit the network. Another
way to simulate a network error is via a redirect to self.


More information about the webkit-reviews mailing list