Stream handling and error handling improved
Merge pull request #44 from mohlendo/http-improved

 Stream handling and error handling improved