MCPcopy
hub / github.com/caddyserver/caddy / MatchWithError

Method MatchWithError

modules/caddyhttp/fileserver/matcher.go:327–329  ·  view source on GitHub ↗

MatchWithError returns true if r matches m.

(r *http.Request)

Source from the content-addressed store, hash-verified

325
326// MatchWithError returns true if r matches m.
327func (m MatchFile) MatchWithError(r *http.Request) (bool, error) {
328 return m.selectFile(r)
329}
330
331// selectFile chooses a file according to m.TryPolicy by appending
332// the paths in m.TryFiles to m.Root, with placeholder replacements.

Callers 3

fileMatcherTestFunction · 0.95
TestPHPFileMatcherFunction · 0.95

Calls 1

selectFileMethod · 0.95

Tested by 3

fileMatcherTestFunction · 0.76
TestPHPFileMatcherFunction · 0.76