dcache icon indicating copy to clipboard operation
dcache copied to clipboard

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

Open paulmillar opened this issue 5 months ago • 0 comments

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

paulmillar avatar Jun 19 '25 20:06 paulmillar