Add 'Content-Length' header to WebDAV upload request (#10567)
Co-authored-by: wojtek <wojtek@pop-os.localdomain>
This commit is contained in:
1 parent
5db765e4e5
commit
72c1905110
1 file changed
+3
-1
@@ -7,6 +7,7 @@ local socketutil = require("socketutil")
|
||||
local util = require("util")
|
||||
local _ = require("gettext")
|
||||
local logger = require("logger")
|
||||
local lfs = require("libs/libkoreader-lfs")
|
||||
|
||||
local WebDavApi = {
|
||||
}
|
||||
@@ -207,7 +208,8 @@ function WebDavApi:uploadFile(file_url, user, pass, local_path, etag)
|
||||
user = user,
|
||||
password = pass,
|
||||
headers = {
|
||||
["If-Match"] = etag
|
||||
["Content-Length"] = lfs.attributes(local_path, "size"),
|
||||
["If-Match"] = etag,
|
||||
}
|
||||
})
|
||||
socketutil:reset_timeout()
|
||||
|
||||
Reference in new issue
Block a user