Bug Tracker

Opened 7 years ago

Closed 6 years ago

#6062 closed bug (invalid)

Ajax call which retrieves a 301 status does not return this in the error callback

Reported by: daanoz Owned by:
Priority: undecided Milestone: 1.4.2
Component: ajax Version: 1.4.1
Keywords: Cc:
Blocked by: Blocking:



type: "POST", url: formpost.php, error: function(response, textStatus, errorThrown) {




if formpost.php has a redirect (301 header) on correct formsubmission, the ajax call, calls the error event. This is correct, but the status that is return is "0" instead of "301"

Change History (1)

comment:1 Changed 6 years ago by snover

  • Priority set to undecided
  • Resolution set to invalid
  • Status changed from new to closed

Thanks for the report, but this is not a bug. If status code is zero, that means you are trying to redirect to a location that violates the same-origin policy. XMLHttpRequest will always follow redirects and return the status code of the final page.

Note: See TracTickets for help on using tickets.