mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 23:50:49 +00:00
change package
This commit is contained in:
parent
f457ea0fe9
commit
e4c6e5d2e1
@ -28,8 +28,6 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/acceptencoder"
|
||||
)
|
||||
|
||||
// BeegoOutput does work for sending response header.
|
||||
@ -57,9 +55,9 @@ func (output *BeegoOutput) Body(content []byte) {
|
||||
outputWriter := output.Context.ResponseWriter.(io.Writer)
|
||||
var encoding string
|
||||
if output.EnableGzip {
|
||||
encoding = acceptencoder.ParseEncoding(output.Context.Input.Request)
|
||||
encoding = ParseEncoding(output.Context.Input.Request)
|
||||
}
|
||||
if b, n, _ := acceptencoder.WriteBody(encoding, outputWriter, content); b {
|
||||
if b, n, _ := WriteBody(encoding, outputWriter, content); b {
|
||||
output.Header("Content-Encoding", n)
|
||||
} else {
|
||||
output.Header("Content-Length", strconv.Itoa(len(content)))
|
||||
|
Loading…
Reference in New Issue
Block a user