Skip to content

Commit 3b9ee2e

Browse files
committed
refactor: set chunking version 1 as default
1 parent 6866f5a commit 3b9ee2e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

tests/acceptance/bootstrap/WebDav.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ trait WebDav {
6868

6969
private int $httpRequestTimeout = 0;
7070

71-
private ?int $chunkingToUse = null;
72-
7371
/**
7472
* The ability to do requests with depth infinity is disabled by default.
7573
* This remembers when the setting dav.propfind.depth_infinity has been
@@ -1636,10 +1634,6 @@ public function uploadFileWithHeaders(
16361634
?array $headers = [],
16371635
?int $noOfChunks = 0
16381636
):void {
1639-
$chunkingVersion = $this->chunkingToUse;
1640-
if ($noOfChunks <= 0) {
1641-
$chunkingVersion = null;
1642-
}
16431637
try {
16441638
$this->pauseUploadDelete();
16451639
$this->response = UploadHelper::upload(
@@ -1651,7 +1645,7 @@ public function uploadFileWithHeaders(
16511645
$this->getStepLineRef(),
16521646
$headers,
16531647
$this->getDavPathVersion(),
1654-
$chunkingVersion,
1648+
$noOfChunks <= 0 ? null : 1,
16551649
$noOfChunks
16561650
);
16571651
$this->lastUploadDeleteTime = \time();
@@ -1686,9 +1680,6 @@ public function userUploadsAFileInChunk(
16861680
"What does it mean to have $noOfChunks chunks?"
16871681
);
16881682

1689-
// use chunking version 1 as default, since version 2 uses "remote.php/dav/uploads" endpoint and it doesn't exist in oCIS
1690-
$this->chunkingToUse = 1;
1691-
16921683
if ($async === true) {
16931684
$headers['OC-LazyOps'] = 'true';
16941685
}

0 commit comments

Comments
 (0)