HeartbeatMaxServers default to the documented value 10 in 2.4.54.
PR 66131. [Jérôme Billiras]
+ *) mod_dav: DAVlockDiscovery option to disable WebDAV lock discovery
+ This is a game changer for performances if client use PROPFIND a lot,
+ PR 66313. [Emmanuel Dreyfus]
+
Changes with Apache 2.4.54
*) SECURITY: CVE-2022-31813: mod_proxy X-Forwarded-For dropped by
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) mod_dav: DAVlockDiscovery option to disable WebDAV lock discovery
- This is a game changer for performances if client use PROPFIND a lot,
- trunk patch: http://svn.apache.org/r1904638
- http://svn.apache.org/r1904662
- http://svn.apache.org/r1905170
- http://svn.apache.org/r1905206
- http://svn.apache.org/r1905230
- 2.4.x patch: svn merge -c 1904638,1904662,1905170,1905206,1905230 ^/httpd/httpd/trunk .
- +1: manu, covener, gbechis
- covener: xml needs doc tweak after backport
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">Directives</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#davlockdb">DavLockDB</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#davlockdiscovery">DavLockDiscovery</a></li>
</ul>
<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_dav_fs">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_dav_fs">Report a bug</a></li></ul><h3>See also</h3>
<ul class="seealso">
<code>DavLock</code> and extension name chosen by the server.</p>
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="DavLockDiscovery" id="DavLockDiscovery">DavLockDiscovery</a> <a name="davlockdiscovery" id="davlockdiscovery">Directive</a> <a title="Permanent link" href="#davlockdiscovery" class="permalink">¶</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable lock discovery</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DavLockDiscovery on|off</code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DavLockDiscovery on</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
+<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_dav_fs</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available from Apache 2.5.0 and later.</td></tr>
+</table>
+ <p><code class="directive">DavLockDiscovery</code> controls if the lock
+ discovery feature is enabled for <code>PROPFIND</code> method.
+ When disabled, <code>PROPFIND</code> always returns an empty
+ <code>lockdiscovery</code> section. This improves performance
+ if clients use <code>PROPFIND</code> a lot.</p>
+ <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">DavLockDiscovery off</pre>
+</div>
+
</div>
</div>
<div class="bottomlang">
<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">Directives</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#davlockdb">DavLockDB</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#davlockdiscovery">DavLockDiscovery</a></li>
</ul>
<h3>Traitement des bugs</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">Journal des modifications de httpd</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_dav_fs">Problèmes connus</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_dav_fs">Signaler un bug</a></li></ul><h3>Voir aussi</h3>
<ul class="seealso">
serveur.</p>
+</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="davlockdiscovery" id="davlockdiscovery">Directive</a> <a name="DavLockDiscovery" id="DavLockDiscovery">DavLockDiscovery</a> <a title="Lien permanent" href="#davlockdiscovery" class="permalink">¶</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Active la découverte des verrous</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>DavLockDiscovery on|off</code></td></tr>
+<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>DavLockDiscovery on</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel, répertoire, .htaccess</td></tr>
+<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Extension</td></tr>
+<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_dav_fs</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibilité:</a></th><td>Disponible à partir de Apache 2.5.0.</td></tr>
+</table>
+ <p><code class="directive">DavLockDiscovery</code> contrôle la
+ découverte des verrous par la méthode <code>PROPFIND</code>.
+ Lorsqu'elle est désactivée, <code>PROPFIND</code> renvoie
+ toujours une section <code>lockdiscovery</code> vide. Ce
+ réglage améliore les performances dans le cas où des
+ clients utilisent beaucoup <code>PROPFIND</code>.</p>
+ <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">DavLockDiscovery off</pre>
+</div>
+
</div>
</div>
<div class="bottomlang">
<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">ディレクティブ</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#davlockdb">DavLockDB</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#davlockdiscovery">DavLockDiscovery</a></li>
</ul>
<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_dav_fs">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_dav_fs">Report a bug</a></li></ul><h3>参照</h3>
<ul class="seealso">
</code></p></div>
</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="DavLockDiscovery" id="DavLockDiscovery">DavLockDiscovery</a> <a name="davlockdiscovery" id="davlockdiscovery">ディレクティブ</a> <a title="Permanent link" href="#davlockdiscovery" class="permalink">¶</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Enable lock discovery</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>DavLockDiscovery on|off</code></td></tr>
+<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>DavLockDiscovery on</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
+<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
+<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_dav_fs</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available from Apache 2.5.0 and later.</td></tr>
+</table><p>このディレクティブの解説文書は
+ まだ翻訳されていません。英語版をご覧ください。
+ </p></div>
</div>
<div class="bottomlang">
<p><span>翻訳済み言語: </span><a href="../en/mod/mod_dav_fs.html" hreflang="en" rel="alternate" title="English"> en </a> |
<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">Áö½Ã¾îµé</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#davlockdb">DavLockDB</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#davlockdiscovery">DavLockDiscovery</a></li>
</ul>
<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_dav_fs">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_dav_fs">Report a bug</a></li></ul><h3>Âü°í</h3>
<ul class="seealso">
</div>
+<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="directive-section"><h2><a name="DavLockDiscovery" id="DavLockDiscovery">DavLockDiscovery</a> <a name="davlockdiscovery" id="davlockdiscovery">Áö½Ã¾î</a> <a title="Permanent link" href="#davlockdiscovery" class="permalink">¶</a></h2>
+<table class="directive">
+<tr><th><a href="directive-dict.html#Description">¼³¸í:</a></th><td>Enable lock discovery</td></tr>
+<tr><th><a href="directive-dict.html#Syntax">¹®¹ý:</a></th><td><code>DavLockDiscovery on|off</code></td></tr>
+<tr><th><a href="directive-dict.html#Default">±âº»°ª:</a></th><td><code>DavLockDiscovery on</code></td></tr>
+<tr><th><a href="directive-dict.html#Context">»ç¿ëÀå¼Ò:</a></th><td>ÁÖ¼¹ö¼³Á¤, °¡»óÈ£½ºÆ®, directory, .htaccess</td></tr>
+<tr><th><a href="directive-dict.html#Status">»óÅÂ:</a></th><td>Extension</td></tr>
+<tr><th><a href="directive-dict.html#Module">¸ðµâ:</a></th><td>mod_dav_fs</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Áö¿ø:</a></th><td>Available from Apache 2.5.0 and later.</td></tr>
+</table><p>The documentation for this directive has
+ not been translated yet. Please have a look at the English
+ version.</p></div>
</div>
<div class="bottomlang">
<p><span>°¡´ÉÇÑ ¾ð¾î: </span><a href="../en/mod/mod_dav_fs.html" hreflang="en" rel="alternate" title="English"> en </a> |
</usage>
</directivesynopsis>
+<directivesynopsis>
+<name>DavLockDiscovery</name>
+<description>Enable lock discovery</description>
+<syntax>DavLockDiscovery on|off</syntax>
+<default>DavLockDiscovery on</default>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
+</contextlist>
+<compatibility>Available from Apache 2.5.0 and later.</compatibility>
+
+<usage>
+ <p><directive>DavLockDiscovery</directive> controls if the lock
+ discovery feature is enabled for <code>PROPFIND</code> method.
+ When disabled, <code>PROPFIND</code> always returns an empty
+ <code>lockdiscovery</code> section. This improves performance
+ if clients use <code>PROPFIND</code> a lot.</p>
+ <example><title>Example</title>
+ <highlight language="config">
+ DavLockDiscovery off
+ </highlight>
+ </example>
+</usage>
+</directivesynopsis>
+
</modulesynopsis>
</usage>
</directivesynopsis>
+<directivesynopsis>
+<name>DavLockDiscovery</name>
+<description>Active la découverte des verrous</description>
+<syntax>DavLockDiscovery on|off</syntax>
+<default>DavLockDiscovery on</default>
+<contextlist><context>server config</context>
+<context>virtual host</context>
+<context>directory</context>
+<context>.htaccess</context>
+</contextlist>
+<compatibility>Disponible à partir de Apache 2.5.0.</compatibility>
+
+<usage>
+ <p><directive>DavLockDiscovery</directive> contrôle la
+ découverte des verrous par la méthode <code>PROPFIND</code>.
+ Lorsqu'elle est désactivée, <code>PROPFIND</code> renvoie
+ toujours une section <code>lockdiscovery</code> vide. Ce
+ réglage améliore les performances dans le cas où des
+ clients utilisent beaucoup <code>PROPFIND</code>.</p>
+ <example><title>Example</title>
+ <highlight language="config">
+ DavLockDiscovery off
+ </highlight>
+ </example>
+</usage>
+</directivesynopsis>
+
</modulesynopsis>
const char *dir;
int locktimeout;
int allow_depthinfinity;
+ int allow_lockdiscovery;
} dav_dir_conf;
newconf->dir = DAV_INHERIT_VALUE(parent, child, dir);
newconf->allow_depthinfinity = DAV_INHERIT_VALUE(parent, child,
allow_depthinfinity);
+ newconf->allow_lockdiscovery = DAV_INHERIT_VALUE(parent, child,
+ allow_lockdiscovery);
return newconf;
}
return NULL;
}
+/*
+ * Command handler for the DAVLockDiscovery directive, which is FLAG.
+ */
+static const char *dav_cmd_davlockdiscovery(cmd_parms *cmd, void *config,
+ int arg)
+{
+ dav_dir_conf *conf = (dav_dir_conf *)config;
+
+ if (arg)
+ conf->allow_lockdiscovery = DAV_ENABLED_ON;
+ else
+ conf->allow_lockdiscovery = DAV_ENABLED_OFF;
+ return NULL;
+}
+
/*
* Command handler for DAVMinTimeout directive, which is TAKE1
*/
}
/* open the property database (readonly) for the resource */
- if ((err = dav_open_propdb(r, lockdb, resource, 1, NULL,
+ if ((err = dav_open_propdb(r, lockdb, resource, DAV_PROPDB_RO, NULL,
&propdb)) != NULL) {
if (lockdb != NULL)
(*lockdb->hooks->close_lockdb)(lockdb);
static dav_error * dav_propfind_walker(dav_walk_resource *wres, int calltype)
{
dav_walker_ctx *ctx = wres->walk_ctx;
+ dav_dir_conf *conf;
+ int flags = DAV_PROPDB_RO;
dav_error *err;
dav_propdb *propdb;
dav_get_props_result propstats = { 0 };
return NULL;
}
+ conf = ap_get_module_config(ctx->r->per_dir_config, &dav_module);
+ if (conf && conf->allow_lockdiscovery == DAV_ENABLED_OFF)
+ flags |= DAV_PROPDB_DISABLE_LOCKDISCOVERY;
+
/*
** Note: ctx->doc can only be NULL for DAV_PROPFIND_IS_ALLPROP. Since
** dav_get_allprops() does not need to do namespace translation,
** the resource, however, since we are opening readonly.
*/
err = dav_popen_propdb(ctx->scratchpool,
- ctx->r, ctx->w.lockdb, wres->resource, 1,
+ ctx->r, ctx->w.lockdb, wres->resource, flags,
ctx->doc ? ctx->doc->namespaces : NULL, &propdb);
if (err != NULL) {
/* ### do something with err! */
return dav_handle_err(r, err, NULL);
}
- if ((err = dav_open_propdb(r, NULL, resource, 0, doc->namespaces,
+ if ((err = dav_open_propdb(r, NULL, resource,
+ DAV_PROPDB_NONE, doc->namespaces,
&propdb)) != NULL) {
/* undo any auto-checkout */
dav_auto_checkin(r, resource, 1 /*undo*/, 0 /*unlock*/, &av_info);
ACCESS_CONF|RSRC_CONF,
"allow Depth infinity PROPFIND requests"),
+ /* per directory/location, or per server */
+ AP_INIT_FLAG("DAVLockDiscovery", dav_cmd_davlockdiscovery, NULL,
+ ACCESS_CONF|RSRC_CONF,
+ "allow lock discovery by PROPFIND requests"),
+
{ NULL }
};
typedef struct dav_propdb dav_propdb;
+#define DAV_PROPDB_NONE 0
+#define DAV_PROPDB_RO 1
+#define DAV_PROPDB_DISABLE_LOCKDISCOVERY 2
DAV_DECLARE(dav_error *) dav_open_propdb(
request_rec *r,
dav_lockdb *lockdb,
const dav_resource *resource,
- int ro,
+ int flags,
apr_array_header_t *ns_xlate,
dav_propdb **propdb);
request_rec *r,
dav_lockdb *lockdb,
const dav_resource *resource,
- int ro,
+ int flags,
apr_array_header_t *ns_xlate,
dav_propdb **propdb);
dav_buffer wb_lock; /* work buffer for lockdiscovery property */
+ int flags; /* ro, disable lock discovery */
+
/* if we ever run a GET subreq, it will be stored here */
request_rec *subreq;
switch (propid) {
case DAV_PROPID_CORE_lockdiscovery:
+ if (propdb->flags & DAV_PROPDB_DISABLE_LOCKDISCOVERY) {
+ value = "";
+ break;
+ }
+
if (propdb->lockdb != NULL) {
dav_lock *locks;
DAV_DECLARE(dav_error *)dav_open_propdb(request_rec *r, dav_lockdb *lockdb,
const dav_resource *resource,
- int ro,
+ int flags,
apr_array_header_t * ns_xlate,
dav_propdb **p_propdb)
{
- return dav_popen_propdb(r->pool, r, lockdb, resource, ro, ns_xlate, p_propdb);
+ return dav_popen_propdb(r->pool, r, lockdb, resource,
+ flags, ns_xlate, p_propdb);
}
DAV_DECLARE(dav_error *)dav_popen_propdb(apr_pool_t *p,
request_rec *r, dav_lockdb *lockdb,
const dav_resource *resource,
- int ro,
+ int flags,
apr_array_header_t * ns_xlate,
dav_propdb **p_propdb)
{
propdb->lockdb = lockdb;
+ propdb->flags = flags;
+
/* always defer actual open, to avoid expense of accessing db
* when only live properties are involved
*/