fix http_client logic for closing connection
Merge branch 'master' of git://github.com/toffaletti/libten