ee2a010de7
Fixes an intermittent UnboundLocalError that could occur in send_request() when anyio's fail_after context manager incorrectly suppresses exceptions due to a race condition (anyio#589). Changes: - Initialize response_or_error to None before the try block - Add _process_response static method with defensive None check - Handle EndOfStream and ClosedResourceError exceptions explicitly - Use try/except/else structure for cleaner control flow - Add unit tests for _process_response Closes #1717