[Webkit-unassigned] [Bug 12307] New: No way to test error condition of async XMLHttpRequest to file:///
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 17 17:40:11 PST 2007
http://bugs.webkit.org/show_bug.cgi?id=12307
Summary: No way to test error condition of async XMLHttpRequest
to file:///
Product: WebKit
Version: 420+ (nightly)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: XML
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: jcostell at tibco.com
There is no way to tell whether an asynchronous XML HTTP request to the local
disk (when running a page from file:///) has failed.
// #1 works ok from HTTP
var r = new XMLHttpRequest();
r.open("GET", "http://www.apple.com/nowhere.html", true);
r.send();
// wait ...
r.status == 404
// #2 works ok synchronously
var r = new XMLHttpRequest();
r.open("GET", "nowhere.html", false);
r.send(); // throws an error
// #3 but asynchronously ... no way to detect the error
var r = new XMLHttpRequest();
r.open("GET", "nowhere.html", true);
r.send();
// wait ... no error thrown
r.status == 0
Both Internet Explorer and Firefox seem to ignore async when requesting a
resource from the local disk. They both throw an exception like Safari does in
the second example. But they also both throw an exception in the third example
whereas Safari doesn't.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list