mmalecki/http-console2 — Issue #1: Incorrect behavior when posted data contains unicode
Author: encoder
Created: 2012-03-06 19:11:58+00:00
State: open

When somebody types unicode characters in the console for the posted data, http-console2 sends a miscalculated "Content-Length:" header, truncates the request, and hangs up on the response.

The problem is with "command.length" not being done on a utf8 buffer.

I suggest adding the following line, which fixes it:

```javascript
if (this.pending) {
command = new Buffer(command, 'utf8'); // <---- Add this line
req = this.request(this.pending.method, this.pending.path, {
'Content-Length' : command.length
```