Merge pull request #4083 from IamCathal/content-length

Add Content-length field for logging
This commit is contained in:
Ming Deng 2020-07-21 15:47:58 +08:00 committed by GitHub
commit 16b66509f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}