echo icon indicating copy to clipboard operation
echo copied to clipboard

fixed issue #2791 Improved robustness of Response process and added debugging information

Open suwakei opened this issue 7 months ago • 1 comments

Changes

Improvements have been made to the WriteHeader and Flush methods of response.go.

1. Check logger existence with WriteHeader:

r.echo and r.echo.Logger.Warn are not nil before calling r.echo.Logger.Warn. This reduces the risk of panic due to unexpected nil pointer references

2. Additional error logging with Flush:.

If http.ResponseController.Flush() returns an error other than http.ErrNotSupported, it will now log the error if in debug mode (r.echo.Debug == true). This additional logging is useful for debugging during development, since the Flush method of the http.Flusher interface is by convention not to return errors, but the ResponseController may.

suwakei avatar Jun 18 '25 12:06 suwakei

Hi maintainers 👋 Just following up on this PR — happy to make any changes if needed. Please let me know if there's anything blocking review. Thanks!

suwakei avatar Jul 29 '25 16:07 suwakei