Ken,
Thanks for the update.
Regarding the file protocol issue, that's easy:
window.location.protocol is all you need as per SOP.
Just discussed the other points with Andrew.
To summarize:
- file protocol should always return success.
- previously mentioned non-standard status codes for IE should always
return a status code of 0.
- status code of 0 should trigger an onFailure callback (except
obviously for the file protocol).
- status code of 0 should trigger an on0 callback.
- as the specs don't yet specify that an exception should be raised in
case of a network error, we won't implement that for the moment. So a
status code of 0 will not trigger an onException callback.
You're welcomed to submit a patch.
If not I'll look into it asap.
Regards,
Tobie
On Nov 14, 5:41 pm, Ken Snyder <[EMAIL PROTECTED]> wrote:
> Tobie Langel wrote:
> > ...
>
> > Could you please clarify what kind of errors FF is throwing ?
>
> In the case of a network error, FF2 throws a NS_ERROR_NOT_AVAILABLE
> exception any time you get/set XMLHttpRequest.status: the try-catch
> block on Prototype 1.6.0 line 1297 is specifically targeted at FF2.
> getStatus: function() {
> try {
> return this.transport.status || 0;
> } catch (e) { return 0 }
>
> },
> > Also, could you please kindly advise if Safari 2's behaviour is
> > consistent with Safari 3 ?
>
> I don't have S2 to test, but the following article implies that the
> XMLHttpRequest Behavior is the same from S1.2
> onwardshttp://developer.apple.com/internet/webcontent/xmlhttpreq.html
>
> I'll propose a patch based on these items. I intend to map the
> different error code numbers to some custom error codes. The only thing
> I'm not sure is how to definitively tell if a file-based request is
> made. There doesn't appear to be a protocol property of a
> XMLHttpRequest object. I'll have to do some more digging. My current
> guess is to check the url for beginning with "file" or "X:\". Any thoughts?
>
> As far as defining success or failure with file-based ajax, I'm guessing
> that calling a file should return some type of content on success. It
> would be useless to have a file that does nothing and returns no
> content. Am I wrong?
>
> - Ken Snyder
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---