Handle read errors when using res.iter_content.

Resolves #325.