fix spaces vs tabs *sigh*
fix thread leak in http client library usage