Commit 4fc499ee authored by 张宇迪's avatar 张宇迪

update

parent beceb130
......@@ -145,11 +145,13 @@ func Return(res interface{}, err error, Resp *http.Response) {
}
} else {
if Resp.Header.Get("Content-Encoding") == "gzip" {
Resp.Header.Set("Content-Encoding", "utf-8")
b = []byte(err.Error())
b = gzipCompress(&b)
}
}
//if Resp.Header.Get("Content-Encoding") == "gzip" {
//Resp.Header.Set("Content-Encoding","gzip")
//b = gzipCompress(&b)
//}
Resp.Header.Set("X-Log-By", "Apaas")
Resp.Header.Set("Content-Length", strconv.Itoa(len(b)))
Resp.Body = ioutil.NopCloser(bytes.NewBuffer(b))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment