fixed issue #2791 Improved robustness of Response process and added debugging information
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.
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!