Improve HTTP hangup detection. Also, exit the iterator when hung up on.
Merge branch 'fix-stream' into pr-fix-stream