Summary: | No way to test error condition of synchronous XMLHttpRequest to file:/// | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jesse Costello-Good <jesse> | ||||||||
Component: | XML | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | NEW --- | ||||||||||
Severity: | Normal | CC: | ap, emacemac7, jchaffraix, marcus, tom | ||||||||
Priority: | P2 | ||||||||||
Version: | 420+ | ||||||||||
Hardware: | Mac | ||||||||||
OS: | OS X 10.4 | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 10489 | ||||||||||
Attachments: |
|
Description
Jesse Costello-Good
2007-01-17 17:40:10 PST
Created attachment 13181 [details]
test case
In the future, we will probably dispatch an error event for XMLHttpRequest.
From my testing, it appears that IE 7 refuses to load local files altogether. Firefox 2 does raise an exception in send(), but if a local file is accessible, then the actual loading happens asynchronously. This behavior is not in accordance with draft XMLHttpRequest spec AFAICT.
(In reply to comment #1) > Created an attachment (id=13181) [edit] > test case > > In the future, we will probably dispatch an error event for XMLHttpRequest. We have implemented 'onerror' from XMLHttpRequest level 2, which means that we now have a way to check for asynchronous request failures. However during my quick testing, I have tried doing a synchronous one to a non-existent file (just modify the given test case to do a synchronous request) and we do not dispatch an error event nor do we throw an exception. We do not raise an exception because it breaks some website (see http://trac.webkit.org/changeset/23889) but we could at least dispatch an event so there is a way to determine that an error occurred. Renaming the bug, as it now tracks sync requests, not async ones. (In reply to comment #1) > From my testing, it appears that IE 7 refuses to load local files > altogether. This is not quite accurate, it can load local files if the native XHR implementation is switched on in the "Advanced" tab of the "Internet Options". Created attachment 233084 [details]
WIP patch
Fails some tests.
Created attachment 233094 [details]
slightly better, but still fails tests
|