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

Method Match

modules/caddyhttp/encode/encode.go:286–288  ·  view source on GitHub ↗

Match determines, if encoding should be done based on the ResponseMatcher.

(rw *responseWriter)

Source from the content-addressed store, hash-verified

284
285// Match determines, if encoding should be done based on the ResponseMatcher.
286func (enc *Encode) Match(rw *responseWriter) bool {
287 return enc.Matcher.Match(rw.statusCode, rw.Header())
288}
289
290// FlushError is an alternative Flush returning an error. It delays the actual Flush of the underlying
291// ResponseWriterWrapper until headers were written.

Callers

nothing calls this directly

Calls 2

MatchMethod · 0.65
HeaderMethod · 0.45

Tested by

no test coverage detected