1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 23:50:49 +00:00

change package

This commit is contained in:
JessonChan 2015-11-11 13:47:47 +08:00
parent f457ea0fe9
commit e4c6e5d2e1

View File

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