Ticket #8847 (closed enhancement: wontfix)
suggestion for ajax: call out cross-domain failure more clearly
| Reported by: | michaeladamkatz@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | ajax | Version: | 1.5.2 |
| Keywords: | Cc: | jaubourg | |
| Blocking: | Blocked by: |
Description
See the comments below the problem description.
Summary: I had my browser pointed to a file://C:/... URL, and jquery was considering my ajax call to http://localhost/... to be "cross domain", and it was failing pretty silently. My suggestion is for jquery to modify the error string (textStatus) in this case to complain about cross domain or cross protocol to give a clue as to what happened.
Change History
comment:1 Changed 2 years ago by timmywil
- Cc jaubourg added
- Priority changed from undecided to low
- Component changed from unfiled to ajax
comment:2 follow-up: ↓ 3 Changed 2 years ago by jaubourg
- Status changed from new to closed
- Resolution set to wontfix
The error callbacks accepts three parameters: function( jqXHR, statusText, error )
StatusText sure is "error" but the error string itself is "No Transport" (the browser does not support the type of request -- here a cross-domain one -- so no suitable transport was found).
comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 23 months ago by ap@…
Replying to jaubourg:
StatusText sure is "error" but the error string itself is "No Transport"
I just ran into the exact same problem and the error string was empty. Moreover the GET requests goes out and registers in the server log, so clearly there *is* transport available.
This is very confusing. Very Microsoft-ish if you will. It "just fails" giving no clues as to where to dig to make it working.
Please do consider re-opening the ticket, or I can submit a new one if that's a better option.
comment:4 in reply to: ↑ 3 Changed 23 months ago by jaubourg
Then it's most probably another problem. Opening a new ticket seems like a good idea.
Replying to ap@…:
Replying to jaubourg:
StatusText sure is "error" but the error string itself is "No Transport"
I just ran into the exact same problem and the error string was empty. Moreover the GET requests goes out and registers in the server log, so clearly there *is* transport available.
This is very confusing. Very Microsoft-ish if you will. It "just fails" giving no clues as to where to dig to make it working.
Please do consider re-opening the ticket, or I can submit a new one if that's a better option.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
