Skip to content

Commit

Permalink
Merge pull request thephpleague#1456 from WaqasIbrahim/3.x
Browse files Browse the repository at this point in the history
use absolute uri as destination header for webdav
  • Loading branch information
frankdejonge authored Apr 24, 2022
2 parents 29eb78c + 75f6082 commit c64adbe
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 c64adbe

Please sign in to comment.