From a66b9950e7e1db8d64140f5fa4a6559b04d3a207 Mon Sep 17 00:00:00 2001 From: IamCathal Date: Mon, 20 Jul 2020 21:21:59 +0100 Subject: [PATCH] Add Content-length field for logging --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router.go b/router.go index a993a1af..6a8ac6f7 100644 --- a/router.go +++ b/router.go @@ -1046,7 +1046,7 @@ func LogAccess(ctx *beecontext.Context, startTime *time.Time, statusCode int) { HTTPReferrer: r.Header.Get("Referer"), HTTPUserAgent: r.Header.Get("User-Agent"), RemoteUser: r.Header.Get("Remote-User"), - BodyBytesSent: 0, // @todo this one is missing! + BodyBytesSent: r.ContentLength, } logs.AccessLog(record, BConfig.Log.AccessLogsFormat) }