sabre-io / dav

sabre/dav is a CalDAV, CardDAV and WebDAV framework for PHP
http://sabre.io
BSD 3-Clause "New" or "Revised" License
1.52k stars 344 forks source link

DAV Client discards any item in a PROPFIND response that has an other status than 200 #1517

Closed individual-it closed 9 months ago

individual-it commented 10 months ago

If a server responds to a PROPFIND request with a multistatus response and some items have a non 200 status they will be discarded in the return of propFind() Caused by these lines https://github.com/sabre-io/dav/blob/master/lib/DAV/Client.php#L242-L247

The behaiviour is generally OK, but oncloud/ocis uses the 425 response code if a file was uploaded but is asynchronously processed, e.g. for antivirus checks.

What about providing propFind() a list of accepted status codes? In our case it would be [200, 425].

I'm happy to provide a PR

DeepDiver1975 commented 10 months ago

Question is why the client is discarding props at all. A server for sure adds these props on purpose and any client should access those.

individual-it commented 10 months ago

returning all props regardless of the status, would also fit our purpose, the status just should be included in the returned data, then the client can deal with it as it wish.

DeepDiver1975 commented 10 months ago

yeah - the status is filtered out in the client .....

In terms of not breaking backwards compat I'd go for a second propfind implementation which is basically returning the parsed xml plainly ...

phil-davis commented 9 months ago

New client propFindUnfiltered is provided in https://github.com/sabre-io/dav/releases/tag/4.6.0

See PR #1519 and #1526