httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1199086 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/core.xml docs/manual/upgrading.xml include/http_core.h modules/dav/fs/repos.c
Date Tue, 08 Nov 2011 03:06:09 GMT
Author: sf
Date: Tue Nov  8 03:06:08 2011
New Revision: 1199086

URL: http://svn.apache.org/viewvc?rev=1199086&view=rev
Log:
Change default FileETag to be "size mtime", i.e. remove the inode. Adjust the
etag generation in mod_dav_fs to the new default.

PR 49623.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/docs/manual/mod/core.xml
    httpd/httpd/trunk/docs/manual/upgrading.xml
    httpd/httpd/trunk/include/http_core.h
    httpd/httpd/trunk/modules/dav/fs/repos.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1199086&r1=1199085&r2=1199086&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Nov  8 03:06:08 2011
@@ -16,6 +16,9 @@ Changes with Apache 2.3.15
      core: Fix integer overflow in ap_pregsub. This can be triggered e.g.
      with mod_setenvif via a malicious .htaccess. [Stefan Fritsch]
 
+  *) core, mod_dav_fs: Change default ETag to be "size mtime", i.e. remove
+     the inode. PR 49623. [Stefan Fritsch]
+
   *) mod_lua: Expose SSL variables via r:ssl_var_lookup().  [Eric Covener]
 
   *) mod_lua: LuaHook{AccessChecker,AuthChecker,CheckUserID,TranslateName}

Modified: httpd/httpd/trunk/docs/manual/mod/core.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/core.xml?rev=1199086&r1=1199085&r2=1199086&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/core.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/core.xml Tue Nov  8 03:06:08 2011
@@ -1532,11 +1532,13 @@ request</description>
 <description>File attributes used to create the ETag
 HTTP response header for static files</description>
 <syntax>FileETag <var>component</var> ...</syntax>
-<default>FileETag INode MTime Size</default>
+<default>FileETag MTime Size</default>
 <contextlist><context>server config</context><context>virtual host</context>
 <context>directory</context><context>.htaccess</context>
 </contextlist>
 <override>FileInfo</override>
+<compatibility>The default used to be "INode&nbsp;MTime&nbsp;Size" in 2.3.14
and
+earlier.</compatibility>
 
 <usage>
     <p>
@@ -1579,7 +1581,7 @@ HTTP response header for static files</d
     <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>
+    <module>mod_dav_fs</module> uses <code>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>.

Modified: httpd/httpd/trunk/docs/manual/upgrading.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/upgrading.xml?rev=1199086&r1=1199085&r2=1199086&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/upgrading.xml (original)
+++ httpd/httpd/trunk/docs/manual/upgrading.xml Tue Nov  8 03:06:08 2011
@@ -188,6 +188,9 @@
         <li><directive module="core">EnableSendfile</directive> now
         defaults to Off.</li>
 
+        <li><directive module="core">FileETag</directive> now
+        defaults to "MTime Size" (without INode).</li>
+
         <li><module>mod_log_config</module>: <a
         href="modules/mod_log_config.html#formats">${cookie}C</a>
         matches whole cookie names.  Previously any substring would

Modified: httpd/httpd/trunk/include/http_core.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/http_core.h?rev=1199086&r1=1199085&r2=1199086&view=diff
==============================================================================
--- httpd/httpd/trunk/include/http_core.h (original)
+++ httpd/httpd/trunk/include/http_core.h Tue Nov  8 03:06:08 2011
@@ -461,8 +461,9 @@ typedef unsigned long etag_components_t;
 #define ETAG_MTIME (1 << 1)
 #define ETAG_INODE (1 << 2)
 #define ETAG_SIZE  (1 << 3)
-#define ETAG_BACKWARD (ETAG_MTIME | ETAG_INODE | ETAG_SIZE)
 #define ETAG_ALL   (ETAG_MTIME | ETAG_INODE | ETAG_SIZE)
+/* This is the default value used */
+#define ETAG_BACKWARD (ETAG_MTIME | ETAG_SIZE)
 
 /**
  * @brief Server Signature Enumeration

Modified: httpd/httpd/trunk/modules/dav/fs/repos.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/fs/repos.c?rev=1199086&r1=1199085&r2=1199086&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/dav/fs/repos.c (original)
+++ httpd/httpd/trunk/modules/dav/fs/repos.c Tue Nov  8 03:06:08 2011
@@ -1859,14 +1859,14 @@ static dav_error * dav_fs_walk(const dav
 static const char *dav_fs_getetag(const dav_resource *resource)
 {
     dav_resource_private *ctx = resource->info;
+    /* XXX: This should really honor the FileETag setting */
 
     if (!resource->exists)
         return apr_pstrdup(ctx->pool, "");
 
     if (ctx->finfo.filetype != APR_NOFILE) {
         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_HEX_FMT "\"",
                             (apr_uint64_t) ctx->finfo.size,
                             (apr_uint64_t) ctx->finfo.mtime);
     }



Mime
View raw message