[mod_webdav] deprecated unsafe partial PUT compat
commitd334ee5c2fc57f297810f187303eda2d10439fa7
authorGlenn Strauss <gstrauss@gluelogic.com>
Wed, 17 Apr 2019 03:41:27 +0000 (16 23:41 -0400)
committerGlenn Strauss <gstrauss@gluelogic.com>
Mon, 22 Apr 2019 05:09:28 +0000 (22 01:09 -0400)
tree51cdcee70e209f455a9641b3d61a51d6c2958d1f
parenteee29b65e54e9ee8e9ccf568593bc80a66629b79
[mod_webdav] deprecated unsafe partial PUT compat

RFC 7231 forbids partial PUT.  However, historical versions of
lighttpd mod_webdav did provide this (mis-)feature.  Therefore,
provide *deprecated* unsafe partial PUT support for compatibility
with historical lighttpd mod_webdav (prior to mod_webdav rewrite),
but require new config option to enable this compatible behavior:

webdav.opts = ( "deprecated-unsafe-partial-put" => "enable" )

The partial PUT support implemented by historical lighttpd mod_webdav
makes no effort to account for shrinkage or growth of range replaced.
The request body is splat into the *existing* file at the offset
provided which is quite unsafe and can cause corruption in data sent
to concurrent download requests.

Use of this (mis-)feature is discouraged, and support may be removed
in the future, without any further notice.
src/mod_webdav.c