fix array out of bound error when http client posts big request body

This patch also improves performance a bit by not copying request
buffer.

Fix issue #78.
Merge remote-tracking branch 'dieken/big-post-body' into tcp_input_fix