diff options
author | Francis Lavoie <lavofr@gmail.com> | 2020-09-16 20:09:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 18:09:28 -0600 |
commit | b95b87381a282e1fe57295d145b71645d7801f07 (patch) | |
tree | 853f7368ac81f6ede2de30503201cf943841b34e /modules/caddyhttp/fileserver/staticfiles_test.go | |
parent | b01bb275b395643542ceca4fbc82bedea8e43937 (diff) |
fileserver: Fix try_files for directories; windows fix (#3684)
* fileserver: Fix try_files for directories, windows fix
* fileserver: Add new file type placeholder, refactoring, tests
* fileserver: Review cleanup
* fileserver: Flip the return args order
Diffstat (limited to 'modules/caddyhttp/fileserver/staticfiles_test.go')
-rw-r--r-- | modules/caddyhttp/fileserver/staticfiles_test.go | 6 |
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", |