mirror of
https://github.com/astaxie/beego.git
synced 2024-11-16 12:10:55 +00:00
Merge pull request #2359 from kbynd/patch-1
content-length not set in case EnableGZIP=true
This commit is contained in:
commit
195c9b24eb
@ -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)))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user