mirror of
https://github.com/astaxie/beego.git
synced 2024-11-16 14:20:56 +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 {
|
if b, n, _ := WriteBody(encoding, buf, content); b {
|
||||||
output.Header("Content-Encoding", n)
|
output.Header("Content-Encoding", n)
|
||||||
|
output.Header("Content-Length", strconv.Itoa(buf.Len()))
|
||||||
} else {
|
} else {
|
||||||
output.Header("Content-Length", strconv.Itoa(len(content)))
|
output.Header("Content-Length", strconv.Itoa(len(content)))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user