Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#8847 closed enhancement (wontfix)

suggestion for ajax: call out cross-domain failure more clearly

Reported by: [email protected] Owned by:
Priority: low Milestone: 1.next
Component: ajax Version: 1.5.2
Keywords: Cc: jaubourg
Blocked by: Blocking:

Description

See http://stackoverflow.com/questions/5625596/jquery-aspx-error-function-always-called-even-with-apparently-valid-return-data

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 (4)

comment:1 Changed 11 years ago by timmywil

Cc: jaubourg added
Component: unfiledajax
Priority: undecidedlow

comment:2 Changed 11 years ago by jaubourg

Resolution: wontfix
Status: newclosed

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 ; Changed 10 years ago by [email protected]

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 10 years ago by jaubourg

Then it's most probably another problem. Opening a new ticket seems like a good idea.

Replying to [email protected]:

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.

Note: See TracTickets for help on using tickets.