Detect socket read failures for status and headers, to handle more gracefully. Fixes #2
Fixed conflict