ZeonXr opened a new issue, #7822:
URL: https://github.com/apache/opendal/issues/7822
### Describe the bug
The WebDAV service fails to parse a valid `207 Multi-Status` PROPFIND
response when a single `<response>` contains multiple `<propstat>` entries.
The current WebDAV response model treats `propstat` as a single field, so
XML deserialization can fail with:
```text
deserialize xml, source: duplicate field `propstat`
```
However, WebDAV servers can group properties by status. For example,
available properties can be returned in a `200 OK` propstat, while unavailable
properties can be returned in a `404 Not Found` propstat under the same
response.
Example response shape:
```xml
<D:response>
<D:href>/webdav/example/</D:href>
<D:propstat>
<D:prop>
<D:resourcetype><D:collection/></D:resourcetype>
<D:displayname>example-folder</D:displayname>
<D:getlastmodified>Thu, 25 Jun 2026 06:23:30 GMT</D:getlastmodified>
<D:getetag>"example-etag"</D:getetag>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
<D:propstat>
<D:prop>
<D:creationdate/>
<D:getcontentlength/>
<D:getcontenttype/>
<D:getcontentlanguage/>
<D:source/>
</D:prop>
<D:status>HTTP/1.1 404 Not Found</D:status>
</D:propstat>
</D:response>
```
### Steps to Reproduce
1. Configure the WebDAV service against a server that returns multiple
`<propstat>` entries under one PROPFIND `<response>`.
2. Call an operation that relies on PROPFIND metadata parsing, such as
`stat`, `list`, or `create_dir` parent directory checks.
3. Observe that XML deserialization can fail with duplicate `propstat`.
### Expected Behavior
OpenDAL should parse WebDAV PROPFIND responses with multiple `propstat`
entries.
For metadata parsing, OpenDAL should use a successful `2xx` propstat entry
and ignore failed property groups such as `404 Not Found`.
### Additional Context
This behavior is allowed by WebDAV `207 Multi-Status` semantics: properties
can be grouped by status using multiple `propstat` entries under the same
response.
### Are you willing to submit a PR to fix this bug?
- [x] Yes, I would like to submit a PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]