Skip to content

Commit 7a741e9

Browse files
authored
Merge pull request #266 from nextcloud/bump/stable14/sabre/dav/3.2.2
[stable14] Bump sabre/dav to 3.2.3
2 parents 4242a82 + bd699a9 commit 7a741e9

6 files changed

Lines changed: 32 additions & 28 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"php-opencloud/openstack": "3.0.5",
4040
"pimple/pimple": "3.2.3",
4141
"punic/punic": "^1.6",
42-
"sabre/dav": "^3.2.0",
42+
"sabre/dav": "^3.2.3",
4343
"stecman/symfony-console-completion": "^0.7.0",
4444
"swiftmailer/swiftmailer": "^6.0",
4545
"symfony/console": "3.4.12",

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer/installed.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2571,17 +2571,17 @@
25712571
},
25722572
{
25732573
"name": "sabre/dav",
2574-
"version": "3.2.2",
2575-
"version_normalized": "3.2.2.0",
2574+
"version": "3.2.3",
2575+
"version_normalized": "3.2.3.0",
25762576
"source": {
25772577
"type": "git",
25782578
"url": "https://github.com/sabre-io/dav.git",
2579-
"reference": "e987775e619728f12205606c9cc3ee565ffb1516"
2579+
"reference": "a9780ce4f35560ecbd0af524ad32d9d2c8954b80"
25802580
},
25812581
"dist": {
25822582
"type": "zip",
2583-
"url": "https://api.github.com/repos/sabre-io/dav/zipball/e987775e619728f12205606c9cc3ee565ffb1516",
2584-
"reference": "e987775e619728f12205606c9cc3ee565ffb1516",
2583+
"url": "https://api.github.com/repos/sabre-io/dav/zipball/a9780ce4f35560ecbd0af524ad32d9d2c8954b80",
2584+
"reference": "a9780ce4f35560ecbd0af524ad32d9d2c8954b80",
25852585
"shasum": ""
25862586
},
25872587
"require": {
@@ -2612,7 +2612,7 @@
26122612
"ext-curl": "*",
26132613
"ext-pdo": "*"
26142614
},
2615-
"time": "2017-02-15T03:06:08+00:00",
2615+
"time": "2018-10-19T09:58:27+00:00",
26162616
"bin": [
26172617
"bin/sabredav",
26182618
"bin/naturalselection"

sabre/dav/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
ChangeLog
22
=========
33

4+
3.2.3 (2018-10-19)
5+
------------------
6+
7+
* #982: Make sure that files that are siblings of directories, are reported
8+
as files (@nickvergessen)
9+
410
3.2.2 (2017-02-14)
511
------------------
612

sabre/dav/lib/DAV/CorePlugin.php

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,14 @@ function httpGet(RequestInterface $request, ResponseInterface $response) {
8282

8383
if (!$node instanceof IFile) return;
8484

85-
if ($request->getHeader('X-Sabre-Original-Method') === 'HEAD') {
86-
$body = '';
87-
} else {
88-
$body = $node->get();
89-
90-
// Converting string into stream, if needed.
91-
if (is_string($body)) {
92-
$stream = fopen('php://temp', 'r+');
93-
fwrite($stream, $body);
94-
rewind($stream);
95-
$body = $stream;
96-
}
85+
$body = $node->get();
86+
87+
// Converting string into stream, if needed.
88+
if (is_string($body)) {
89+
$stream = fopen('php://temp', 'r+');
90+
fwrite($stream, $body);
91+
rewind($stream);
92+
$body = $stream;
9793
}
9894

9995
/*
@@ -249,13 +245,13 @@ function httpOptions(RequestInterface $request, ResponseInterface $response) {
249245
function httpHead(RequestInterface $request, ResponseInterface $response) {
250246

251247
// This is implemented by changing the HEAD request to a GET request,
252-
// and telling the request handler that is doesn't need to create the body.
248+
// and dropping the response body.
253249
$subRequest = clone $request;
254250
$subRequest->setMethod('GET');
255-
$subRequest->setHeader('X-Sabre-Original-Method', 'HEAD');
256251

257252
try {
258253
$this->server->invokeMethod($subRequest, $response, false);
254+
$response->setBody('');
259255
} catch (Exception\NotImplemented $e) {
260256
// Some clients may do HEAD requests on collections, however, GET
261257
// requests and HEAD requests _may_ not be defined on a collection,

sabre/dav/lib/DAV/Tree.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,9 @@ function getMultipleNodes($paths) {
298298
*/
299299
protected function copyNode(INode $source, ICollection $destinationParent, $destinationName = null) {
300300

301-
if (!$destinationName) $destinationName = $source->getName();
301+
if ((string)$destinationName === '') {
302+
$destinationName = $source->getName();
303+
}
302304

303305
if ($source instanceof IFile) {
304306

0 commit comments

Comments
 (0)