Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

suwakei
Copy link

@suwakei suwakei commented Jun 18, 2025

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant