rcourtman
|
02419827b6
|
test: Add tests for hostAgentSearchCandidates parameter variants
Tests all code paths: strict mode (both params), platform only,
and no params (generic paths).
|
2025-12-02 00:03:19 +00:00 |
|
rcourtman
|
4751f57187
|
test: Add edge case for capturePublicURLFromRequest nil inputs
Tests the early return paths when router, request, or config are nil.
|
2025-12-01 23:59:17 +00:00 |
|
rcourtman
|
b9f9077496
|
test: Add edge case for canCapturePublicURL nil inputs
Tests the early return paths when config or request are nil.
|
2025-12-01 23:56:59 +00:00 |
|
rcourtman
|
2c26054d57
|
Add unit tests for router.go proxy header utility functions (api)
Add 77 test cases for 4 previously untested utility functions:
- firstForwardedValue: 14 cases for X-Forwarded-For header parsing
- sanitizeForwardedHost: 27 cases for host sanitization with scheme/port handling
- isLoopbackHost: 20 cases for loopback detection (localhost, 127.x, ::1)
- shouldAppendForwardedPort: 16 cases for port appending decisions
Key edge cases covered:
- IPv6 address bracket handling in sanitizeForwardedHost
- Case-insensitive localhost detection
- Full 127.0.0.0/8 loopback range validation
- strconv.Atoi accepts negative port strings (documented as current behavior)
|
2025-11-30 15:34:32 +00:00 |
|
rcourtman
|
7704a18e52
|
ADA: Add unit tests for isDirectLoopbackRequest
|
2025-11-29 20:07:59 +00:00 |
|