Add support for composer and fix a bug with Curl HTTP adapter not resetting its filehandler.