Skip to content

Commit

Permalink
use ErrorPage only when body size == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dworld committed Nov 13, 2014
1 parent f23aad0 commit aaeb1c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pipe_error_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func (s *Server) GetErrorPagePipeHandler() PipeHandler {
ctx := GetContext(r)
status := ctx.ResponseWriter.Status()
if status >= 400 && status <= 599 {
if s.ErrorPageHandler != nil {
if s.ErrorPageHandler != nil && ctx.ResponseWriter.Size() == 0 {
s.ErrorPageHandler.ServeContext(ctx)
}
}
Expand Down

0 comments on commit aaeb1c9

Please sign in to comment.