From 0ea9db317038f5510a1ca875b55af770997ec148 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sun, 24 Dec 2023 11:21:43 +0000 Subject: Fix specifying auth type in UrlHelper::fetch(), add a test for 403 auth retry. --- classes/UrlHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/UrlHelper.php b/classes/UrlHelper.php index d088a355b..03202cff8 100644 --- a/classes/UrlHelper.php +++ b/classes/UrlHelper.php @@ -333,7 +333,7 @@ class UrlHelper { if ($login && $pass && in_array($auth_type, ['basic', 'digest', 'ntlm'])) { // Let Guzzle handle the details for auth types it supports - $req_options[GuzzleHttp\RequestOptions::AUTH] = [$login, $pass]; + $req_options[GuzzleHttp\RequestOptions::AUTH] = [$login, $pass, $auth_type]; } elseif ($auth_type === 'any') { // https://docs.guzzlephp.org/en/stable/faq.html#how-can-i-add-custom-curl-options $req_options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_ANY; -- cgit v1.2.3