lib/httpx/plugins/digest_authentication.rb in httpx-0.22.1 vs lib/httpx/plugins/digest_authentication.rb in httpx-0.22.2

- old
+ new

@@ -44,9 +44,11 @@ next end probe_response = wrap { super(request).first } + return probe_response unless probe_response.is_a?(Response) + if probe_response.status == 401 && digest.can_authenticate?(probe_response.headers["www-authenticate"]) request.transition(:idle) request.headers["authorization"] = digest.authenticate(request, probe_response.headers["www-authenticate"]) super(request) else