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

Problem with Accept header #8

Open
dgm opened this issue Nov 15, 2009 · 3 comments
Open

Problem with Accept header #8

dgm opened this issue Nov 15, 2009 · 3 comments

Comments

@dgm
Copy link

dgm commented Nov 15, 2009

I just had a heck of a time tracking down a problem where $.getJSON was not sending the proper Accept header. I finally found it here...

Is it necessary to do this now? It overrides every call to jquery and breaks any attempt to accept something different.

(function($){$().ajaxSend(function(a,xhr,s){xhr.setRequestHeader("Accept","text/javascript, text/html, application/xml, text/xml, /")})})(jQuery);

@dgm
Copy link
Author

dgm commented Dec 11, 2009

Correction: That left only the default type; this changes the default type but leaves the other types available.

(function($){$.extend( $.ajaxSettings.accepts, { _default: "text/javascript, text/html, application/xml, text/xml, /" } );})

@dgm
Copy link
Author

dgm commented Dec 11, 2009

Wait, whose fork am I using? I look at this one and I see that it has been fixed. Arg!

@dgm
Copy link
Author

dgm commented Dec 11, 2009

I think I had the svn version or something.

brauliobo pushed a commit to coletivoEITA/jrails that referenced this issue Oct 7, 2014
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

1 participant