Skip to content

Commit

Permalink
fix proxy compress panic bug (easegress-io#629)
Browse files Browse the repository at this point in the history
* fix proxy compress panic bug

* update
  • Loading branch information
suchen-sci committed May 23, 2022
1 parent 1c329e2 commit 5596d7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/filters/proxy/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ func (sp *ServerPool) buildResponse(spCtx *serverPoolContext) (err error) {
body := readers.NewCallbackReader(spCtx.stdResp.Body)
spCtx.stdResp.Body = body

if sp.proxy.compression.compress(spCtx.stdReq, spCtx.stdResp) {
if sp.proxy.compression != nil && sp.proxy.compression.compress(spCtx.stdReq, spCtx.stdResp) {
spCtx.AddTag("gzip")
}

Expand Down

0 comments on commit 5596d7c

Please sign in to comment.