Skip to content

Commit

Permalink
use absolute uri as destination header for webdav
Browse files Browse the repository at this point in the history
  • Loading branch information
WaqasIbrahim committed Apr 22, 2022
1 parent 29eb78c commit 75f6082
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WebDAV/WebDAVAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 75f6082

Please sign in to comment.