From 3af15c0725605162dc8dad0c6ab241e2dc4553c6 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 16 Jun 2020 12:02:23 -0600 Subject: caddyhttp: Empty, not nil, query matcher matches empty query string --- modules/caddyhttp/matchers_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/caddyhttp/matchers_test.go') diff --git a/modules/caddyhttp/matchers_test.go b/modules/caddyhttp/matchers_test.go index 219ada8..1ac9588 100644 --- a/modules/caddyhttp/matchers_test.go +++ b/modules/caddyhttp/matchers_test.go @@ -529,20 +529,20 @@ func TestQueryMatcher(t *testing.T) { expect: false, }, { - scenario: "nil matcher value should match empty query", - match: MatchQuery(nil), + scenario: "empty matcher value should match empty query", + match: MatchQuery{}, input: "/?", expect: true, }, { scenario: "nil matcher value should NOT match a non-empty query", - match: MatchQuery(nil), + match: MatchQuery{}, input: "/?foo=bar", expect: false, }, { scenario: "non-nil matcher should NOT match an empty query", - match: MatchQuery{"": []string{}}, + match: MatchQuery{"": nil}, input: "/?", expect: false, }, -- cgit v1.2.3