Skip to content

Commit

Permalink
There is no need in updating status code in srw, since it will be a…
Browse files Browse the repository at this point in the history
…utomatically updated on `crw.Rollback` call
  • Loading branch information
valyala committed Nov 22, 2017
1 parent 4b1440f commit 41106fa
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ func (rp *reverseProxy) serveFromCache(s *scope, srw *statResponseWriter, req *h
// Restore the original status code by proxyRequest if it was set.
if srw.statusCode != 0 {
crw.WriteHeader(srw.statusCode)
} else {
srw.WriteHeader(crw.StatusCode())
}
err = crw.Rollback()
} else {
Expand Down

0 comments on commit 41106fa

Please sign in to comment.