summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/matchers_test.go
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2023-11-01 17:57:48 +0100
committerTom Barrett <tom@tombarrett.xyz>2023-11-01 18:11:33 +0100
commit240c3d1338415e5d82ef7ca0e52c4284be6441bd (patch)
tree4b0ee5d208c2cdffa78d65f1b0abe0ec85f15652 /modules/caddyhttp/matchers_test.go
parent73e78ab226f21e6c6c68961af88c4ab9c746f4f4 (diff)
parent0e204b730aa2b1fa0835336b1117eff8c420f713 (diff)
vbump to v2.7.5HEADcaddy-cgi
Diffstat (limited to 'modules/caddyhttp/matchers_test.go')
-rw-r--r--modules/caddyhttp/matchers_test.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/caddyhttp/matchers_test.go b/modules/caddyhttp/matchers_test.go
index 4f5da69..041975d 100644
--- a/modules/caddyhttp/matchers_test.go
+++ b/modules/caddyhttp/matchers_test.go
@@ -21,6 +21,7 @@ import (
"net/http/httptest"
"net/url"
"os"
+ "runtime"
"testing"
"github.com/caddyserver/caddy/v2"
@@ -254,11 +255,6 @@ func TestPathMatcher(t *testing.T) {
expect: true,
},
{
- match: MatchPath{"*.php"},
- input: "/foo/index.php. .",
- expect: true,
- },
- {
match: MatchPath{"/foo/bar.txt"},
input: "/foo/BAR.txt",
expect: true,
@@ -435,8 +431,10 @@ func TestPathMatcher(t *testing.T) {
func TestPathMatcherWindows(t *testing.T) {
// only Windows has this bug where it will ignore
- // trailing dots and spaces in a filename, but we
- // test for it on all platforms to be more consistent
+ // trailing dots and spaces in a filename
+ if runtime.GOOS != "windows" {
+ return
+ }
req := &http.Request{URL: &url.URL{Path: "/index.php . . .."}}
repl := caddy.NewReplacer()