Add Content-Length and properly handle Buffers.