From 130c868e95dfd1a8b1d39fd217bc6378f6b72ec0 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Tue, 15 Oct 2024 12:00:40 -0400 Subject: [PATCH] Log transfer_encoding on the request --- modules/caddyhttp/marshalers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/caddyhttp/marshalers.go b/modules/caddyhttp/marshalers.go index c985bb92..9bce377f 100644 --- a/modules/caddyhttp/marshalers.go +++ b/modules/caddyhttp/marshalers.go @@ -51,6 +51,9 @@ func (r LoggableHTTPRequest) MarshalLogObject(enc zapcore.ObjectEncoder) error { Header: r.Header, ShouldLogCredentials: r.ShouldLogCredentials, }) + if r.TransferEncoding != nil { + enc.AddArray("transfer_encoding", LoggableStringArray(r.TransferEncoding)) + } if r.TLS != nil { enc.AddObject("tls", LoggableTLSConnState(*r.TLS)) }