Skip to content

Commit 6017f6d

Browse files
committed
docs(nextcloud): Clarify why setting Content-Length for WebDAV PUT requests is important
Signed-off-by: provokateurin <kate@provokateurin.de>
1 parent f6e645e commit 6017f6d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/nextcloud/lib/src/webdav/client.dart

+6
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ class WebDavClient {
142142

143143
/// Request to put a new file at [path] with [localData] as content.
144144
///
145+
/// Setting [contentLength] is important because some web servers will consider the file to be empty otherwise.
146+
/// It will be required in the next major release.
147+
///
145148
/// See:
146149
/// * [putStream] for a complete operation executing this request.
147150
http.BaseRequest putStream_Request(
@@ -187,6 +190,9 @@ class WebDavClient {
187190
/// [created] sets the date when the file was created on the server.
188191
/// [contentLength] sets the length of the [localData] that is uploaded.
189192
/// [onProgress] can be used to watch the upload progress. Possible values range from 0.0 to 1.0. [contentLength] needs to be set for it to work.
193+
/// Setting [contentLength] is important because some web servers will consider the file to be empty otherwise.
194+
/// It will be required in the next major release.
195+
///
190196
/// See:
191197
/// * http://www.webdav.org/specs/rfc2518.html#METHOD_PUT for more information.
192198
/// * [putStream_Request] for the request sent by this method.

0 commit comments

Comments
 (0)