diff --git a/context/output.go b/context/output.go index c09b9d19..4b513dd8 100644 --- a/context/output.go +++ b/context/output.go @@ -67,6 +67,7 @@ func (output *BeegoOutput) Body(content []byte) error { } if b, n, _ := WriteBody(encoding, buf, content); b { output.Header("Content-Encoding", n) + output.Header("Content-Length", strconv.Itoa(buf.Len())) } else { output.Header("Content-Length", strconv.Itoa(len(content))) }