From d0a2dfddd6afc1c975b01dfe3da41a26e821b6c4 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Thu, 31 Mar 2016 09:21:43 +0000 Subject: [PATCH] when strange unicode characters are in the string then content length is not correct --- node_modules/c9/rest_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node_modules/c9/rest_client.js b/node_modules/c9/rest_client.js index 8631edf5..0aec2fff 100644 --- a/node_modules/c9/rest_client.js +++ b/node_modules/c9/rest_client.js @@ -36,7 +36,7 @@ function RestClient(host, port, config) { var headers = _.extend({ "Accept": "application/json", "Content-Type": "application/json", - "Content-Length": payload.length + "Content-Length": Buffer.byteLength(payload) }, config.headers || {}); var options = {