Fix merge
Throw InternalServerError exception if file_put_contents fails for WebDAV, fixes #4011