Commit 4ab1e7f3 by rfkelly0

DAVFS: send the Content-MD5 header if we know the md5 of the file

parent 8fcf4df8
......@@ -233,6 +233,9 @@ class DAVFS(FS):
con.putrequest(method,url.path)
if size is not None:
con.putheader("Content-Length",str(size))
if hasattr(body,"md5"):
md5 = body.md5.decode("hex").encode("base64")
con.putheader("Content-MD5",md5)
for hdr,val in headers.iteritems():
con.putheader(hdr,val)
self._cookiejar.add_cookie_header(FakeReq(con,url.scheme,url.path))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment