Commit b7a781c
Add comprehensive tests for IP extraction improvements
Adds tests for issue #2757 IP extraction edge cases where RemoteAddr
may not include a port. The enhanced extractIP function now properly
handles IPv4/IPv6 addresses without ports using net.ParseIP validation.
Test cases cover:
- IPv4 without port
- IPv6 without port
- IPv6 with port brackets
- Invalid IP format handling
Existing tests for issue #2789 response flush error handling are already
comprehensive and validate the improved error messages with ResponseWriter types.
Fixes #2757
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent d0137c3 commit b7a781c
1 file changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
382 | 410 | | |
383 | 411 | | |
384 | 412 | | |
| |||
0 commit comments