Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit ea0a75e

Browse files
committed
缓存支持gzip
1 parent b8ed6b7 commit ea0a75e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

teacache/process.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func ProcessAfterRequest(req *teaproxy.Request, writer *teaproxy.ResponseWriter)
182182

183183
// check length
184184
contentLength := types.Int(writer.Header().Get("Content-Length"))
185-
if contentLength != len(writer.Body()) {
185+
if contentLength != len(writer.Body()) && writer.Header().Get("Content-Encoding") != "gzip" {
186186
return true
187187
}
188188

0 commit comments

Comments
 (0)