Skip to main content

Bug Tracker

Side navigation

#8847 closed enhancement (wontfix)

Opened April 12, 2011 12:14AM UTC

Closed April 16, 2011 04:31PM UTC

Last modified March 14, 2012 03:49PM UTC

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

Reported by: michaeladamkatz@yahoo.com 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.

Attachments (0)
Change History (4)

Changed April 15, 2011 05:00AM UTC by timmywil comment:1

cc: → jaubourg
component: unfiledajax
priority: undecidedlow

Changed April 16, 2011 04:31PM UTC by jaubourg comment:2

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).

Changed July 08, 2011 08:41PM UTC by ap@swapped.cc comment:3

Replying to [comment:2 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.

Changed July 08, 2011 09:45PM UTC by jaubourg comment:4

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

Replying to [comment:3 ap@…]:

Replying to [comment:2 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.