Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure POST requests have their contentType set correctly, and rem…
…ove unneeded check for origSettings existence. Fixes #6811.
  • Loading branch information
dmethvin committed Jul 25, 2010
1 parent 0a1a860 commit 00fb24f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ajax.js
Expand Up @@ -349,7 +349,7 @@ jQuery.extend({
// Need an extra try/catch for cross domain requests in Firefox 3
try {
// Set the correct header, if data is being sent
if ( s.data || origSettings && origSettings.contentType ) {
if ( s.data || type === "POST" || origSettings.contentType ) {
xhr.setRequestHeader("Content-Type", s.contentType);
}

Expand Down

0 comments on commit 00fb24f

Please sign in to comment.