Refactor routing

This commit is contained in:
Ben Sarmiento
2023-12-12 08:26:39 +01:00
parent 1661857194
commit 72d017682d
6 changed files with 62 additions and 62 deletions

View File

@@ -8,7 +8,7 @@ import (
// optimized versions, no more marshalling
func BaseDirectory(path, added string) string {
return fmt.Sprintf("<d:response><d:href>/%s</d:href><d:propstat><d:prop><d:resourcetype><d:collection/></d:resourcetype><d:getlastmodified>%s</d:getlastmodified></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response>", customPathEscape(path), added)
return fmt.Sprintf("<d:response><d:href>/%s</d:href><d:propstat><d:prop><d:resourcetype><d:collection/></d:resourcetype><d:getlastmodified>%s</d:getlastmodified><d:getcontenttype>httpd/unix-directory</d:getcontenttype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response>", customPathEscape(path), added)
}
func Directory(path, added string) string {