jpillora / xdomain

A pure JavaScript CORS alternative
https://jpillora.com/xdomain/
3.12k stars 270 forks source link

Angular $http errorCallback doesn't kick in when xproxy.html can't be reached. #184

Open ghost opened 8 years ago

ghost commented 8 years ago

I may be wrong, but I have come across what seems to be a bug using xdomain with Angular.

If, for any reason, the slave is not reachable (thus causing a "Timeout waiting on iframe socket") - the code for Angular's errorCallback in $http.post(url, data, config).then(successCallback, errorCallback) is not executed. Removing xdomain and it does.

This is easy to reproduce, as you just have to make the slave unreachable from master (in my case the IIS Express of the slave isn't up).