From 75f60820be96dd0ebb663b74f3f8612660ab1636 Mon Sep 17 00:00:00 2001 From: Waqas Ibrahim Date: Sat, 23 Apr 2022 04:11:18 +0500 Subject: [PATCH] use absolute uri as destination header for webdav --- src/WebDAV/WebDAVAdapter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WebDAV/WebDAVAdapter.php b/src/WebDAV/WebDAVAdapter.php index 491cca025..8906bb450 100644 --- a/src/WebDAV/WebDAVAdapter.php +++ b/src/WebDAV/WebDAVAdapter.php @@ -336,7 +336,7 @@ public function move(string $source, string $destination, Config $config): void try { $response = $this->client->request('MOVE', '/' . ltrim($location, '/'), null, [ - 'Destination' => '/' . ltrim($newLocation, '/'), + 'Destination' => $this->client->getAbsoluteUrl('/' . ltrim($newLocation, '/')), ]); if ($response['statusCode'] < 200 || $response['statusCode'] >= 300) { @@ -372,7 +372,7 @@ public function copy(string $source, string $destination, Config $config): void try { $response = $this->client->request('COPY', '/' . ltrim($location, '/'), null, [ - 'Destination' => '/' . ltrim($newLocation, '/'), + 'Destination' => $this->client->getAbsoluteUrl('/' . ltrim($newLocation, '/')), ]); if ($response['statusCode'] < 200 || $response['statusCode'] >= 300) {