Make$.ajax() call more error proof
|Reported by:||marantz||Owned by:||jaubourg|
$.ajax() appear to be seriously flawed after the 1.4.3 rewrite
Please find this line in jQuery 1.5:
protocol = loc.protocol || "http:",
'document.location.protocol' is not always safe to read, so it's better to completely error protect this line or an unnecessary (access denied) exception will be thrown in some rare cases.
The bug appear to hit expecially IE6-7-8 but not in all machines, and at random.
Docs says that after you set document.domain = "foo.com" the protocol property become write-only and any attempt to access it may fail
If "http:" is a valid default for protocol, i think the exception should not be here in initialization, but at least after the call is really made. So i belive this simple fix (error protect this line of cone) will be accepted and integrated in next jQuery release.
Change History (15)
comment:1 Changed 6 years ago by
|Component:||unfiled → ajax|
|Owner:||set to marantz|
|Priority:||undecided → high|
|Status:||new → pending|