Skip to content

Commit

Permalink
Update error.go
Browse files Browse the repository at this point in the history
this caused `http: multiple response.WriteHeader calls` when using method `CustomAbort` or `Abort` when status is already in errMap like 404.
  • Loading branch information
elvizlai committed Aug 28, 2015
1 parent 4202fe8 commit c516819
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion error.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ func exception(errcode string, ctx *context.Context) {

func executeError(err *errorInfo, ctx *context.Context, code int) {
if err.errorType == errorTypeHandler {
ctx.ResponseWriter.WriteHeader(code)
err.handler(ctx.ResponseWriter, ctx.Request)
return
}
Expand Down

0 comments on commit c516819

Please sign in to comment.