From cc97923a7067278c8ff23ee782b7cd2c6e5b2724 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 20 Mar 2017 12:41:56 +0100 Subject: [PATCH] Use authType BASIC for Sabre client in integration tests This helps massively reduce the numerous useless 401 exceptions that appears in the test log. These appear only because Sabre first connects without any auth type to receive the challenge and then sends the authentication data. With this change it will directly use basic auth. --- tests/integration/features/bootstrap/WebDav.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/features/bootstrap/WebDav.php b/tests/integration/features/bootstrap/WebDav.php index b601a51ffc90..b4c4e63a5184 100644 --- a/tests/integration/features/bootstrap/WebDav.php +++ b/tests/integration/features/bootstrap/WebDav.php @@ -141,7 +141,6 @@ public function downloadFileWithRange($fileSource, $range){ public function downloadPublicFileWithRange($range){ $token = $this->lastShareData->data->token; $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav"; - $headers['Range'] = $range; $client = new GClient(); $options = []; @@ -160,7 +159,6 @@ public function downloadPublicFileWithRange($range){ public function downloadPublicFileInsideAFolderWithRange($path, $range){ $token = $this->lastShareData->data->token; $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav" . "$path"; - $headers['Range'] = $range; $client = new GClient(); $options = []; @@ -429,6 +427,7 @@ public function getSabreClient($user) { } else { $settings['password'] = $this->regularUser; } + $settings['authType'] = SClient::AUTH_BASIC; return new SClient($settings); } @@ -686,6 +685,8 @@ public function changeFavStateOfAnElement($user, $path, $favOrUnfav, $folderDept } else { $settings['password'] = $this->regularUser; } + $settings['authType'] = SClient::AUTH_BASIC; + $client = new SClient($settings); if (!$properties) { $properties = [