Browse Source

Merge pull request #44 from JumpeiArashi/multibyte-strings-content-length

Use Buffer.byteLength to get Content-Length
pull/46/head
Brett Langdon 10 years ago
parent
commit
51556b0982
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/client.js

+ 1
- 1
lib/client.js View File

@ -80,7 +80,7 @@ client.prototype.request = function(method, path, params, callback){
if(["POST", "PUT"].indexOf(http_options["method"]) >= 0){
http_options["headers"] = {
"Content-Type": params["contentType"] ? params["contentType"] : "application/json",
"Content-Length": body.length,
"Content-Length": Buffer.byteLength(body),
};
}


Loading…
Cancel
Save