From: Rich Bowen Date: Wed, 20 May 2026 20:02:21 +0000 (+0000) Subject: mod_dav: Document DavHonorMtimeHeader directive X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=31ea075d61d6de6542ff44cd3aa1e66db1d087bf;p=thirdparty%2Fapache%2Fhttpd.git mod_dav: Document DavHonorMtimeHeader directive When enabled, allows WebDAV clients to set resource modification times via the X-OC-Mtime request header on PUT and MKCOL requests. Resolves: bz#70054 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1934445 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_dav.xml b/docs/manual/mod/mod_dav.xml index 7f95512abe..a94a246ca0 100644 --- a/docs/manual/mod/mod_dav.xml +++ b/docs/manual/mod/mod_dav.xml @@ -286,6 +286,51 @@ a DAV resource + +DavHonorMtimeHeader +Allow clients to set resource modification times via the +X-OC-Mtime request header +DavHonorMtimeHeader on|off +DavHonorMtimeHeader off +directory + + +

The DavHonorMtimeHeader directive controls + whether mod_dav will honor the + X-OC-Mtime request header when processing + PUT and MKCOL requests. This header + is used by some WebDAV sync clients to preserve the + original modification time of uploaded files.

+ +

When enabled, if a client sends a PUT or + MKCOL request with an X-OC-Mtime + header, the server will set the resource's modification time to + the value specified in that header. The header value must be a + Unix timestamp (seconds since epoch), expressed as a decimal + integer.

+ +

If the header is present but malformed (contains non-digit + characters), the server will respond with a 400 Bad Request + error.

+ + +

Enabling this directive allows clients to manipulate file + modification times on the server. Only enable it in locations + where clients are trusted, and always protect access with + authentication.

+
+ + Example + +<Directory "/var/www/dav/sync"> + Dav On + DavHonorMtimeHeader on +</Directory> + + +
+
+