From eee47e7b0c1ab45d2870c946b15e21fa8c810565 Mon Sep 17 00:00:00 2001 From: HoneyryderChuck Date: Fri, 10 Oct 2025 10:20:18 +0100 Subject: [PATCH] digest_auth fix: make sure that, if the probe response fails for some reason, that it is returned in an array --- lib/httpx/plugins/digest_auth.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/httpx/plugins/digest_auth.rb b/lib/httpx/plugins/digest_auth.rb index e392a9b2..25757568 100644 --- a/lib/httpx/plugins/digest_auth.rb +++ b/lib/httpx/plugins/digest_auth.rb @@ -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)