Mola-maker opened a new pull request, #9067: URL: https://github.com/apache/opendal/pull/9067
# Which issue does this PR close? Closes #9066. # Rationale for this change `parse_propstat` fails when a PROPFIND response leaves out `getlastmodified`. RFC 4918 §15.7 makes that property conditional, so a compliant server may omit it. With OpenDAL's own `dav-server-opendalfs` on `services::Memory`, every write, `stat`, `list` and `create_dir` fails. # What changes are included in this PR? - When `getlastmodified` is missing, leave `last_modified` unset instead of returning an error. A value that is present is parsed as before. - Add `test_parse_propstat_without_getlastmodified`. It covers a file and a collection without the property. No caller requires `last_modified`. Conditional reads send `If-Modified-Since` and `If-Unmodified-Since` to the server, and the lister, `stat` and the writer only pass the value through. Verification (Windows 11, rustc 1.99.1): - The new test fails on main and passes with this change. - `cargo test -p opendal-service-webdav --lib`: 57 passed. - `cargo clippy -p opendal-service-webdav --all-targets -- -D warnings`: clean for the Windows host and `--target x86_64-unknown-linux-gnu`. - Behavior tests against `dav-server-opendalfs` on Memory: 58 passed before this change, 109 after. The remaining failures are backend capabilities: COPY, ETag, and `Depth: infinity`. - Behavior tests against wsgidav, which always sends `getlastmodified`: 141 passed, the same as on main. The 3 failures are the same server-specific ones as on main: no dead-property store, an unquoted PROPFIND ETag, and a non-atomic `Overwrite: F` MOVE. # Are there any user-facing changes? The webdav service now works with servers that omit `getlastmodified`. `Metadata::last_modified` is `None` for those entries. # Breaking changes # AI Usage Statement - Harness: Claude Code - Model: Anthropic Claude - Effort: default - Role: Found the bug by running the webdav behavior suite against `dav-server-opendalfs`, wrote the fix and the test, and ran the checks above. A separate review pass checked the RFC reading and every consumer of `last_modified`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
