From 8d03ec151a539522a33d66721b9c5fd1c249e7eb Mon Sep 17 00:00:00 2001 From: Joe Koop Date: Thu, 9 Jun 2022 08:28:35 -0500 Subject: [PATCH] fix: encode webdav href as uri (#28) * Revert "fix: filename xml escaping" This reverts commit ce154d9ebca4012d88e7523dfaef6b825359b9b6. * webdav filenames are fixed --- src/server.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server.rs b/src/server.rs index bf89df0..150d4e6 100644 --- a/src/server.rs +++ b/src/server.rs @@ -829,8 +829,8 @@ impl PathItem { HTTP/1.1 200 OK "#, - escape_str_pcdata(prefix), - escape_str_pcdata(&self.name), + prefix, + encode_uri(&self.name), escape_str_pcdata(&self.base_name), mtime ), @@ -847,8 +847,8 @@ impl PathItem { HTTP/1.1 200 OK "#, - escape_str_pcdata(prefix), - escape_str_pcdata(&self.name), + prefix, + encode_uri(&self.name), escape_str_pcdata(&self.base_name), self.size.unwrap_or_default(), mtime