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

Method Close

modules/caddyhttp/reverseproxy/fastcgi/client.go:193–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191}
192
193func (f clientCloser) Close() error {
194 stderr := f.r.stderr.Bytes()
195 if len(stderr) == 0 {
196 return f.rwc.Close()
197 }
198
199 logLevel := zapcore.WarnLevel
200 if f.status >= 400 {
201 logLevel = zapcore.ErrorLevel
202 }
203
204 if c := f.logger.Check(logLevel, "stderr"); c != nil {
205 c.Write(zap.ByteString("body", stderr))
206 }
207
208 return f.rwc.Close()
209}
210
211// Request returns an HTTP response with header and body
212// from the FastCGI responder.

Callers 5

ServeHTTPMethod · 0.45
sendFcgiFunction · 0.45
generateRandFileFunction · 0.45
RoundTripMethod · 0.45
PostFileMethod · 0.45

Calls 2

CheckMethod · 0.45
WriteMethod · 0.45

Tested by 3

ServeHTTPMethod · 0.36
sendFcgiFunction · 0.36
generateRandFileFunction · 0.36