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 5 years ago by jitter
- Cc jaubourg added
- Component changed from unfiled to ajax
- Owner set to marantz
- Priority changed from undecided to high
- Status changed from new to pending
comment:4 in reply to: ↑ 3 Changed 5 years ago by jaubourg
- Owner changed from marantz to jaubourg
- Status changed from new to assigned
comment:7 Changed 5 years ago by jaubourg
- Resolution set to fixed
- Status changed from assigned to closed