]> source.dussan.org Git - nextcloud-server.git/commit
fix BadRequest error if CONTENT_LENGTH not set
authorchli1 <chli1@users.noreply.github.com>
Thu, 4 Sep 2014 11:49:15 +0000 (13:49 +0200)
committerchli1 <chli1@users.noreply.github.com>
Thu, 4 Sep 2014 11:49:15 +0000 (13:49 +0200)
commit712487c861d56ae61459e86d4f50cf4c273a2133
tree33f6e666e57f64ea4819d7c573358ff92c9bc644
parenta8861c70c8e5876a961f00e49db88843432bf7ba
fix BadRequest error if CONTENT_LENGTH not set

If client does not send content length header on webdav upload (e.g. because the content comes from a stream and its length is not predictable) the put() method should not try to compare the content length value with the actually amount of received data, because this will always fail and results in a BadRequest exception. So the check will only be performed if $_SERVER['CONTENT_LENGTH'] is set.
lib/private/connector/sabre/file.php