Skip to content

Commit

Permalink
Merge pull request #213 from joshisa/master
Browse files Browse the repository at this point in the history
Use Buffer.byteLength instead of string length for Content-Length header
  • Loading branch information
fzaninotto committed Jan 6, 2014
2 parents c6c960e + bfcfbbd commit 1f32cef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/monitor.js
Expand Up @@ -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;
Expand Down

0 comments on commit 1f32cef

Please sign in to comment.