fix http connection handling
Merge pull request #8 from ltuzova/http-connection-handling

fix http connection handling