Make sure payload is sent for PUT requests. (Thanks alx). Fixes #4971.
authorJohn Resig <jeresig@gmail.com>
Mon, 27 Jul 2009 19:02:40 +0000 (19:02 +0000)
committerJohn Resig <jeresig@gmail.com>
Mon, 27 Jul 2009 19:02:40 +0000 (19:02 +0000)
src/ajax.js

index adae6ae..c6b8d0f 100644 (file)
@@ -451,7 +451,7 @@ jQuery.extend({
 
                // Send the data
                try {
-                       xhr.send( type === "POST" ? s.data : null );
+                       xhr.send( type === "POST" || type === "PUT" ? s.data : null );
                } catch(e) {
                        jQuery.handleError(s, xhr, null, e);
                }