diff options
Diffstat (limited to 'modules/caddyhttp/matchers_test.go')
-rw-r--r-- | modules/caddyhttp/matchers_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/matchers_test.go b/modules/caddyhttp/matchers_test.go index 07c98e3..7da09a6 100644 --- a/modules/caddyhttp/matchers_test.go +++ b/modules/caddyhttp/matchers_test.go @@ -205,7 +205,7 @@ func TestPathREMatcher(t *testing.T) { // set up the fake request and its Replacer req := &http.Request{URL: &url.URL{Path: tc.input}} - repl := &Replacer{req: req, resp: httptest.NewRecorder(), custom: make(map[string]string)} + repl := NewReplacer(req, httptest.NewRecorder()) ctx := context.WithValue(req.Context(), ReplacerCtxKey, repl) req = req.WithContext(ctx) @@ -322,7 +322,7 @@ func TestHeaderREMatcher(t *testing.T) { // set up the fake request and its Replacer req := &http.Request{Header: tc.input, URL: new(url.URL)} - repl := &Replacer{req: req, resp: httptest.NewRecorder(), custom: make(map[string]string)} + repl := NewReplacer(req, httptest.NewRecorder()) ctx := context.WithValue(req.Context(), ReplacerCtxKey, repl) req = req.WithContext(ctx) |