Fixes two issues:
1. extractIP now handles RemoteAddr without port (#2757)
- Previously returned empty string for addresses like "192.168.1.1"
- Now validates with net.ParseIP and returns the IP directly
- Maintains full backwards compatibility for existing behavior
2. Response.Flush uses modern error handling (#2789)
- Replaces type assertion with http.NewResponseController
- Provides descriptive panic message with ResponseWriter type info
- Improves debugging experience when flushing is not supported
Both changes maintain full backwards compatibility while fixing edge cases.
Closes#2757Closes#2789🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix incorrect return ip value for RealIpHeader
* Improve test file to compare correct real IPs to each other and have better comments
* Refactor ip extractor tests to be more readable (longer but readable)
Co-authored-by: toimtoimtoim <desinformatsioon@gmail.com>