winstonjs / node-loggly

A client implementation for Loggly in node.js
http://github.com/winstonjs/node-loggly
Other
233 stars 80 forks source link

Use Buffer.byteLength instead of msg.length #32

Closed mafintosh closed 10 years ago

mafintosh commented 10 years ago

When logging utf-8 data the module currently responds with the following error:

client.log({hellå:wårld});
// --> { [Error: Parse Error] bytesParsed: 166, code: 'HPE_INVALID_CONSTANT' }

This PR fixes this by using Buffer.byteLength(msg) instead of msg.length for content-length.

jcrugzz commented 10 years ago

@mafintosh good looks, thanks!

freeall commented 10 years ago

Yeah, mafintosh is very good oooking :)