webdav: fix X-OC-MTIME support when uploading a file#7810
Merged
mksahakyan merged 1 commit intodCache:11.0from Jun 26, 2025
Merged
webdav: fix X-OC-MTIME support when uploading a file#7810mksahakyan merged 1 commit intodCache:11.0from
mksahakyan merged 1 commit intodCache:11.0from
Conversation
Motivation: dCache claims to support the `X-OC-MTIME` HTTP request header when uploading data. This may be used to specify the desired modification time (mtime) when uploading a file. Currently, the mtime is set when creating the namespace entry. This doesn't work because the mtime is updated (to the current time) when the pool updates the namespace entry by specifying the file's size. Modification: Update the WebDAV door to send the desired mtime to the pool. This takes advantage of the existing support for updating the namespace entry (via the pool) on a successful upload. Update pool to include the door-supplied FileAttributes' MODIFICATION_TIME in the list of attributes that is uses to update the namespace entry on successful completion of the upload. Result: A bug is fixed that prevented dCache's support for the 'X-OC-MTIME' HTTP request header on PUT requests from working. Note that, for this patch to be effective, both the WebDAV doors and all pools that accept such upload requests need to be updated. Target: master Request: 11.0 Request: 10.2 Request: 10.1 Request: 10.0 Request: 9.2 Requires-notes: yes Requires-book: no Patch: https://rb.dcache.org/r/14446/ Acked-by: Tigran Mkrtchyan
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
dCache claims to support the
X-OC-MTIMEHTTP request header when uploading data. This may be used to specify the desired modification time (mtime) when uploading a file.Currently, the mtime is set when creating the namespace entry. This doesn't work because the mtime is updated (to the current time) when the pool updates the namespace entry by specifying the file's size.
Modification:
Update the WebDAV door to send the desired mtime to the pool. This takes advantage of the existing support for updating the namespace entry (via the pool) on a successful upload.
Update pool to include the door-supplied FileAttributes' MODIFICATION_TIME in the list of attributes that is uses to update the namespace entry on successful completion of the upload.
Result:
A bug is fixed that prevented dCache's support for the 'X-OC-MTIME' HTTP request header on PUT requests from working. Note that, for this patch to be effective, both the WebDAV doors and all pools that accept such upload requests need to be updated.
Target: master
Request: 11.0
Request: 10.2
Request: 10.1
Request: 10.0
Request: 9.2
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/14446/
Acked-by: Tigran Mkrtchyan