summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorwn_ <[email protected]>2023-12-24 11:21:43 +0000
committerwn_ <[email protected]>2023-12-24 11:21:43 +0000
commit0ea9db317038f5510a1ca875b55af770997ec148 (patch)
tree1a6be722f06c261aa7e28dd2a4a9665bf5cb949e /classes
parent9a1f7c2ebfe4470440097c403cec2da011f22d02 (diff)
Fix specifying auth type in UrlHelper::fetch(), add a test for 403 auth retry.
Diffstat (limited to 'classes')
-rw-r--r--classes/UrlHelper.php2
1 files changed, 1 insertions, 1 deletions
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;