summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/fileserver/staticfiles_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/fileserver/staticfiles_test.go')
-rw-r--r--modules/caddyhttp/fileserver/staticfiles_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/caddyhttp/fileserver/staticfiles_test.go b/modules/caddyhttp/fileserver/staticfiles_test.go
index c47fbd1..1bbd77b 100644
--- a/modules/caddyhttp/fileserver/staticfiles_test.go
+++ b/modules/caddyhttp/fileserver/staticfiles_test.go
@@ -43,6 +43,10 @@ func TestSanitizedPathJoin(t *testing.T) {
expect: "foo",
},
{
+ inputPath: "/foo/",
+ expect: "foo" + string(filepath.Separator),
+ },
+ {
inputPath: "/foo/bar",
expect: filepath.Join("foo", "bar"),
},
@@ -73,7 +77,7 @@ func TestSanitizedPathJoin(t *testing.T) {
{
inputRoot: "/a/b",
inputPath: "/%2e%2e%2f%2e%2e%2f",
- expect: filepath.Join("/", "a", "b"),
+ expect: filepath.Join("/", "a", "b") + string(filepath.Separator),
},
{
inputRoot: "C:\\www",