Permalink
Browse files

When serializing multipart/form-data forms we need a pair of \r\n bet…

…ween the boundary and headers and the data value. Not just one.
  • Loading branch information...
1 parent bce05d1 commit 794822c25db8248c1c7be06c1bdca41bcee24209 @h-lame h-lame committed with Jul 21, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/html/form.js
View
@@ -456,7 +456,7 @@ var __param__= function( array, boundary ) {
array[i].value.push(content);
array[i].value = array[i].value.join("\r\n");
}
- serialized.push('Content-Disposition: form-data; name="'+array[i].name+'"'+fn+'\r\n');
+ serialized.push('Content-Disposition: form-data; name="'+array[i].name+'"'+fn+'\r\n\r\n');
serialized.push(array[i].value);
serialized.push( "\r\n" );
}

0 comments on commit 794822c

Please sign in to comment.