mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 18:20:54 +00:00
change package
This commit is contained in:
parent
f457ea0fe9
commit
e4c6e5d2e1
@ -28,8 +28,6 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/astaxie/beego/acceptencoder"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// BeegoOutput does work for sending response header.
|
// BeegoOutput does work for sending response header.
|
||||||
@ -57,9 +55,9 @@ func (output *BeegoOutput) Body(content []byte) {
|
|||||||
outputWriter := output.Context.ResponseWriter.(io.Writer)
|
outputWriter := output.Context.ResponseWriter.(io.Writer)
|
||||||
var encoding string
|
var encoding string
|
||||||
if output.EnableGzip {
|
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)
|
output.Header("Content-Encoding", n)
|
||||||
} 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