Skip to content

Commit

Permalink
Merge pull request #9 from ttys3/master
Browse files Browse the repository at this point in the history
fix(echo): avoid duplicated body response
  • Loading branch information
mvrilo authored Jan 19, 2024
2 parents 18c51b0 + d276f64 commit e6245d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions echo/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ func New(doc redoc.Redoc) echo.MiddlewareFunc {
return func(next echo.HandlerFunc) echo.HandlerFunc {
return func(ctx echo.Context) error {
handle(ctx.Response(), ctx.Request())
if ctx.Response().Committed {
return nil
}
return next(ctx)
}
}
Expand Down

0 comments on commit e6245d7

Please sign in to comment.