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.
parent ada8879e
......@@ -141,7 +141,6 @@ trait WebDav {
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 @@ trait WebDav {
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 @@ trait WebDav {
} else {
$settings['password'] = $this->regularUser;
}
$settings['authType'] = SClient::AUTH_BASIC;
return new SClient($settings);
}
......@@ -686,6 +685,8 @@ trait WebDav {
} else {
$settings['password'] = $this->regularUser;
}
$settings['authType'] = SClient::AUTH_BASIC;
$client = new SClient($settings);
if (!$properties) {
$properties = [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment