mirror of
https://github.com/caddyserver/caddy.git
synced 2026-04-23 17:39:33 -04:00
change the log level if hijacking without writing a status code first
This commit is contained in:
parent
44d453de3c
commit
050d137e76
@ -272,8 +272,8 @@ func (rr *responseRecorder) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||
if !rr.wroteHeader {
|
||||
// hijacking without writing status code first works as long as subsequent writes follows http1.1
|
||||
// wire format, but it will show up with a status code of 0 in the access log and bytes written
|
||||
// will include response headers.
|
||||
caddy.Log().Debug("hijacking without writing status code first")
|
||||
// will include response headers. Response headers won't be present in the log if not set on the response writer.
|
||||
caddy.Log().Warn("hijacking without writing status code first")
|
||||
}
|
||||
//nolint:bodyclose
|
||||
conn, brw, err := http.NewResponseController(rr.ResponseWriterWrapper).Hijack()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user