Handle socket errors in iter_content
Replace setattr
Merge pull request #2148 from romanlevin/handle-socket-error-in-iter_content

Handle socket errors in iter_content