From b5bd04e2b547b5f732720120153dcaa1f322f724 Mon Sep 17 00:00:00 2001 From: Christoph Polcin Date: Thu, 27 Jan 2022 16:27:44 +0100 Subject: [PATCH] Escapes destination path on copy and move #42 --- requests.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests.go b/requests.go index 55cc0f3..7e13b9b 100644 --- a/requests.go +++ b/requests.go @@ -138,7 +138,7 @@ func (c *Client) propfind(path string, self bool, body string, resp interface{}, func (c *Client) doCopyMove(method string, oldpath string, newpath string, overwrite bool) (int, io.ReadCloser) { rs, err := c.req(method, oldpath, nil, func(rq *http.Request) { - rq.Header.Add("Destination", Join(c.root, newpath)) + rq.Header.Add("Destination", PathEscape(Join(c.root, newpath))) if overwrite { rq.Header.Add("Overwrite", "T") } else {