Skip to content
This repository was archived by the owner on May 26, 2025. It is now read-only.

Commit 6f39767

Browse files
Ensure correct XHR encoding for multipart/form-data forms (#174)
Fixes #168
1 parent 03d6486 commit 6f39767

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/send-request.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ module.exports = function(location, options, callback) {
6868
request.setRequestHeader("X-PJAX-Selectors", JSON.stringify(options.selectors))
6969

7070
// Send the proper header information for POST forms
71-
if (requestPayload && requestMethod === "POST") {
71+
if (requestPayload && requestMethod === "POST" && !formData) {
7272
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
7373
}
7474

0 commit comments

Comments
 (0)