delete bin, fix

This commit is contained in:
life
2015-09-24 13:35:53 +08:00
parent 96e1033b99
commit d4dc79ab44
3 changed files with 0 additions and 0 deletions

23
node_modules/node_modules_updates.txt generated vendored Normal file
View File

@@ -0,0 +1,23 @@
# node_modules
## needle
https://github.com/tomas/needle/issues/97
When i post a file (multipart) with another key-value pair (contains UTF8 characters), my servers got incorrect encoding.
then i see the code in multipart.js (generate_part) is :
return_part += part.value
the value look like in UTF8 encoding but send out with binary encoding
Finally i get the collect UTF8 characters by change to :
return_part += new Buffer(part.value+'', 'utf8').toString("binary");
// filename也有问题
// 这里filename被encodeURIComponent, 中文会有问题
// return_part += '; filename="' + encodeURIComponent(filename) + '"\r\n';
// return_part += '; filename="' + filename + '"\r\n';
// 改成这样
return_part += '; filename="' + new Buffer(filename, 'utf8').toString("binary") + '"\r\n';
// return_part += new Buffer(part.value+'', 'utf8').toString("binary");