Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE XDR Support breaks jQuery AJAX calls with custom dataTypes #31

Open
mithusree opened this issue Oct 28, 2013 · 1 comment
Open

IE XDR Support breaks jQuery AJAX calls with custom dataTypes #31

mithusree opened this issue Oct 28, 2013 · 1 comment

Comments

@mithusree
Copy link

$.ajaxTransport code added in the plugin support Microsoft XDR Support #18
is causing problems with $.ajax with custom ajax return data types like JSON.

For eg;

Whenever jquery.xmpp.js is included,

$.ajax({
        url: 'api.php',
        type: "POST",
        cache : false,
        dataType: "json",
        data : {
            username : "aaa",
            password : "bbb"
        },
        success : function(response) {
            console.log("AJAX Success");
            console.log(response);
        },
        error : function(jqXHR, textStatus, errorThrown) {
            console.log("AJAX Error");
            console.log(jqXHR);
            console.log("Status code: " +jqXHR.status);
            console.log(textStatus);
            console.log(errorThrown);
        }
    });

error call back is always executed, and the jqXHR.status will be 400 even if server responds with

header('HTTP/1.1 200 OK');

Better XDR support script can be found here
https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest

@maxpowel
Copy link
Owner

Thank you, I will try to see how to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants