Skip to content

webdav: fix X-OC-MTIME support when uploading a file#7810

Merged
mksahakyan merged 1 commit intodCache:11.0from
paulmillar:fix/11.0/rb-14446
Jun 26, 2025
Merged

webdav: fix X-OC-MTIME support when uploading a file#7810
mksahakyan merged 1 commit intodCache:11.0from
paulmillar:fix/11.0/rb-14446

Conversation

@paulmillar
Copy link
Member

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

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
@mksahakyan mksahakyan merged commit f37b547 into dCache:11.0 Jun 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants