digest_auth fix: make sure that, if the probe response fails for some reason, that it is returned in an array

This commit is contained in:
HoneyryderChuck 2025-10-10 10:20:18 +01:00
parent 65e7d9c926
commit eee47e7b0c

View File

@ -48,7 +48,7 @@ module HTTPX
probe_response = wrap { super(request).first }
return probe_response unless probe_response.is_a?(Response)
return ([probe_response] * requests.size) unless probe_response.is_a?(Response)
if probe_response.status == 401 && digest.can_authenticate?(probe_response.headers["www-authenticate"])
request.transition(:idle)