Skip to content

Commit

Permalink
enable passing contentType: false to $.ajax()
Browse files Browse the repository at this point in the history
  • Loading branch information
mnmly authored and mislav committed Sep 28, 2012
1 parent 189d946 commit e7c1bbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]
xhr.overrideMimeType && xhr.overrideMimeType(mime)
}
if (settings.contentType || (settings.data && settings.type.toUpperCase() != 'GET'))
if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))
baseHeaders['Content-Type'] = (settings.contentType || 'application/x-www-form-urlencoded')
settings.headers = $.extend(baseHeaders, settings.headers || {})

Expand Down

0 comments on commit e7c1bbd

Please sign in to comment.