]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r607437 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Wed, 2 Jan 2008 09:41:46 +0000 (09:41 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 2 Jan 2008 09:41:46 +0000 (09:41 +0000)
* Adjust etag generation to produce identical results on 32-bit and 64-bit
  platforms and avoid a regression with conditional PUT's on lock and etag.

  Add a warning to the documentation of FileETAG that changes of the ETAG
  format can cause conditionals to fail on mod_dav_fs provided backends.

PR: 44152
Submitted by: Michael Clark <michael metaparadigm.com>
eviewed by: rpluem, niq, wrowe

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@608059 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
docs/manual/mod/core.xml
modules/dav/fs/repos.c

diff --git a/CHANGES b/CHANGES
index bb60864dd8edb20f1cd58cb9afe404bbca7d60d2..f6a6e43c94a84b4fbc74c455948c72e110135f9f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -19,6 +19,11 @@ Changes with Apache 2.2.7
      mod_imagemap: Fix a cross-site scripting issue.  Reported by JPCERT.
      [Joe Orton]
 
+  *) mod_dav: Adjust etag generation to produce identical results on 32-bit
+     and 64-bit platforms and avoid a regression with conditional PUT's on lock
+     and etag. PR 44152.
+     [Michael Clark <michael metaparadigm.com>, Ruediger Pluem]
+
   *) log.c: Ensure Win32 resurrects its lost robust logger processes.
      [William Rowe]
 
diff --git a/STATUS b/STATUS
index 86bbe3e7e90faa76efb4b1c0706e453592f2795f..1cdfae398ad27b14a37b3f91f38f8f1a01980f49 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -124,16 +124,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
         Trunk version of patch works
      +1: rpluem, niq, wrowe
 
-   * mod_dav_fs: Adjust etag generation to produce identical results on 32-bit
-     and 64-bit platforms. Avoid a regression with conditional PUT's on lock
-     and etag (because we have a regression otherwise this is a showstopper).
-     PR 44152
-     Trunk version of patch:
-        http://svn.apache.org/viewvc?rev=607437&view=rev
-     Backport version for 2.2.x of patch:
-        Trunk version of patch works
-     +1: rpluem, niq, wrowe
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index e157137f1cafd1b2a213514a7e9755f8e797e3cf..c2fb49d80cc4248eab2065982bcfca6148cdc2c6 100644 (file)
@@ -1163,6 +1163,14 @@ HTTP response header</description>
     the setting for that subdirectory (which will be inherited by
     any sub-subdirectories that don't override it) will be equivalent to
     <code>FileETag&nbsp;MTime&nbsp;Size</code>.</p>
+    <note type="warning"><title>Warning</title>
+    Do not change the default for directories or locations that have WebDAV
+    enabled and use <module>mod_dav_fs</module> as a storage provider.
+    <module>mod_dav_fs</module> uses <code>INode&nbsp;MTime&nbsp;Size</code>
+    as a fixed format for <code>ETag</code> comparisons on conditional requests.
+    These conditional requests will break if the <code>ETag</code> format is
+    changed via <directive>FileETag</directive>.
+    </note>
 </usage>
 </directivesynopsis>
 
index 8c28c0764af773d67a0d3b0cd8b12f8dd82c2e35..a532e6e94fa723d9359c9d66f7d4f1b1362b0091 100644 (file)
@@ -1777,13 +1777,15 @@ static const char *dav_fs_getetag(const dav_resource *resource)
         return apr_pstrdup(ctx->pool, "");
 
     if (ctx->finfo.filetype != 0) {
-        return apr_psprintf(ctx->pool, "\"%lx-%lx-%lx\"",
-                           (unsigned long) ctx->finfo.inode,
-                           (unsigned long) ctx->finfo.size,
-                           (unsigned long) ctx->finfo.mtime);
+        return apr_psprintf(ctx->pool, "\"%" APR_UINT64_T_HEX_FMT "-%"
+                            APR_UINT64_T_HEX_FMT "-%" APR_UINT64_T_HEX_FMT "\"",
+                            (apr_uint64_t) ctx->finfo.inode,
+                            (apr_uint64_t) ctx->finfo.size,
+                            (apr_uint64_t) ctx->finfo.mtime);
     }
 
-    return apr_psprintf(ctx->pool, "\"%lx\"", (unsigned long) ctx->finfo.mtime);
+    return apr_psprintf(ctx->pool, "\"%" APR_UINT64_T_HEX_FMT "\"",
+                       (apr_uint64_t) ctx->finfo.mtime);
 }
 
 static const dav_hooks_repository dav_hooks_repository_fs =