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

Method openResponseWriter

modules/caddyhttp/encode/encode.go:223–226  ·  view source on GitHub ↗

openResponseWriter creates a new response writer that may (or may not) encode the response with encodingName. The returned response writer MUST be closed after the handler completes.

(encodingName string, w http.ResponseWriter, isConnect bool)

Source from the content-addressed store, hash-verified

221// encode the response with encodingName. The returned response writer MUST
222// be closed after the handler completes.
223func (enc *Encode) openResponseWriter(encodingName string, w http.ResponseWriter, isConnect bool) *responseWriter {
224 var rw responseWriter
225 return enc.initResponseWriter(&rw, encodingName, w, isConnect)
226}
227
228// initResponseWriter initializes the responseWriter instance
229// allocated in openResponseWriter, enabling mid-stack inlining.

Callers 2

ServeHTTPMethod · 0.95

Calls 1

initResponseWriterMethod · 0.95

Tested by 1