Permalink
Browse files

Merge pull request #213 from joshisa/master

Use Buffer.byteLength instead of string length for Content-Length header
  • Loading branch information...
2 parents c6c960e + bfcfbbd commit 1f32cefc6918da6b73b54ebcf8f9442771b14503 @fzaninotto committed Jan 6, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/monitor.js
View
2 lib/monitor.js
@@ -182,7 +182,7 @@ Monitor.prototype.createPing = function(error, check, timestamp, time, details,
options.method = 'POST';
options.headers = {
'Content-Type': 'application/x-www-form-urlencoded',
- 'Content-Length': postData.length
+ 'Content-Length': Buffer.byteLength(postData)
};
this.applyApiHttpOptions(options);
var self = this;

0 comments on commit 1f32cef

Please sign in to comment.