From 5ae1a5617c4bb1deef22cb3658ee581bb7dbf367 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Mon, 27 Apr 2020 16:46:46 -0400 Subject: caddyhttp: Add split_path to file matcher (used by php_fastcgi) (#3302) * matcher: Add `split_path` option to file matcher; used in php_fastcgi * matcher: Skip try_files split if not the final part of the filename * matcher: Add MatchFile tests * matcher: Clarify SplitPath godoc --- modules/caddyhttp/fileserver/testdata/foo.php.php/index.php | 1 + modules/caddyhttp/fileserver/testdata/index.php | 1 + modules/caddyhttp/fileserver/testdata/notphp.php.txt | 1 + modules/caddyhttp/fileserver/testdata/remote.php | 1 + 4 files changed, 4 insertions(+) create mode 100644 modules/caddyhttp/fileserver/testdata/foo.php.php/index.php create mode 100644 modules/caddyhttp/fileserver/testdata/index.php create mode 100644 modules/caddyhttp/fileserver/testdata/notphp.php.txt create mode 100644 modules/caddyhttp/fileserver/testdata/remote.php (limited to 'modules/caddyhttp/fileserver/testdata') diff --git a/modules/caddyhttp/fileserver/testdata/foo.php.php/index.php b/modules/caddyhttp/fileserver/testdata/foo.php.php/index.php new file mode 100644 index 0000000..4a2ac6b --- /dev/null +++ b/modules/caddyhttp/fileserver/testdata/foo.php.php/index.php @@ -0,0 +1 @@ +foo.php.php/index.php diff --git a/modules/caddyhttp/fileserver/testdata/index.php b/modules/caddyhttp/fileserver/testdata/index.php new file mode 100644 index 0000000..0012f7d --- /dev/null +++ b/modules/caddyhttp/fileserver/testdata/index.php @@ -0,0 +1 @@ +index.php \ No newline at end of file diff --git a/modules/caddyhttp/fileserver/testdata/notphp.php.txt b/modules/caddyhttp/fileserver/testdata/notphp.php.txt new file mode 100644 index 0000000..eba1876 --- /dev/null +++ b/modules/caddyhttp/fileserver/testdata/notphp.php.txt @@ -0,0 +1 @@ +notphp.php.txt diff --git a/modules/caddyhttp/fileserver/testdata/remote.php b/modules/caddyhttp/fileserver/testdata/remote.php new file mode 100644 index 0000000..78f06a2 --- /dev/null +++ b/modules/caddyhttp/fileserver/testdata/remote.php @@ -0,0 +1 @@ +remote.php \ No newline at end of file -- cgit v1.2.3