Closed CSchmidtDD closed 4 years ago
Hi @Chrakker,
Thank you for clear description of the issue.
Unfortunately, it's a bug in the library.
When multiple properties are passed it generates multiple prop
elements, which is incorrect:
<?xml version="1.0" encoding="utf-8"?>
<D:propertyupdate xmlns:D="DAV:" xmlns:te="http://example.com/" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<D:set>
<D:prop>
<te:uploader>chrakker</te:uploader>
</D:prop>
<D:prop>
<te:vertragstyp>XYZ</te:vertragstyp>
</D:prop>
<D:prop>
<te:loeschdatum>01012044</te:loeschdatum>
</D:prop>
</D:set>
</D:propertyupdate>
Looks like some WebDAV servers can handle it and set all properties but a correct request should look like:
<?xml version="1.0" encoding="utf-8"?>
<D:propertyupdate xmlns:D="DAV:" xmlns:te="http://example.com/" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<D:set>
<D:prop>
<te:uploader>chrakker</te:uploader>
<te:vertragstyp>XYZ</te:vertragstyp>
<te:loeschdatum>01012044</te:loeschdatum>
</D:prop>
</D:set>
</D:propertyupdate>
I'll release a new version with a fix.
A new version with a fix is available in NuGet.
Hi @skazantsev ,
thank you for your fast fix. Am currently working with owncloud/nextcloud and this behaviour is a major QOL change for me and probably others as well that included your NuGet. Very much appreciated, indeed!
Hi.
I could not find documentation to PROPPATCH and looked up your tests to determine how to place custom properties into the propfind Dictionary with a certain schema.
Here is the code I am using:
I expect something like this:
Sadly, it only takes the last Property from the Dict (here "loeschdatum") and sets it, not the other Properties, disregarding the length of the Dictionary completely.
Can you help me out there?