Mola-maker opened a new issue, #9066: URL: https://github.com/apache/opendal/issues/9066
### OpenDAL version or commit main (f5ef36e). The same check is in v0.59.5. ### Affected service or component services/webdav: `parse_propstat` (`core/services/webdav/src/core.rs`) ### Describe the bug `parse_propstat` fails with `propfind response missing getlastmodified` whenever a PROPFIND response leaves out `DAV:getlastmodified`. RFC 4918 ยง15.7 requires that property only on resources whose GET returns a `Last-Modified` header, so a compliant server may omit it, for example on collections or on resources without a modification time. When a server omits it, every write (the writer stats and creates parents), `stat`, `list` and `create_dir` fails. OpenDAL's own WebDAV server, `integrations/dav-server` (`dav-server-opendalfs`), is one such server when it runs on `services::Memory`. It returns no `getlastmodified` for `/`, for directories, or for files. ### Steps to Reproduce Serve `services::Memory` with `dav-server-opendalfs` (`DavHandler::builder().filesystem(OpendalFs::new(op))` behind hyper), then run the webdav behavior tests against it: ``` OPENDAL_TEST=webdav OPENDAL_WEBDAV_ENDPOINT=http://127.0.0.1:18960 \ cargo test --test behavior --features tests,services-webdav ``` ``` test result: FAILED. 58 passed; 86 failed ---- behavior::test_create_dir ---- Unexpected (persistent) at create_dir ... => propfind response missing getlastmodified ---- behavior::test_delete_file ---- test panicked: write must succeed: Unexpected (persistent) at write => propfind response missing getlastmodified ``` `curl -X PROPFIND -H "Depth: 0"` against that server returns `resourcetype` (and `getcontentlength` for files) but no `getlastmodified`. ### Actual Behavior Any PROPFIND response without `getlastmodified` is treated as an error. ### Expected Behavior The metadata is built without `last_modified` when the property is missing. ### Additional Context With that change, the same run goes from 58 to 109 passed. The remaining failures come from the memory backend's capabilities, not from parsing: no COPY, no ETag, and `Depth: infinity` is rejected, which `disable_depth_infinity` already covers. ### Reproduction confirmation - [x] I reproduced this issue against the affected component. For a service-specific report, I used the actual service rather than only a mock, emulator, or source-code analysis. ### 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]
