Spec point
- REC1b2: When `endpoint` is an IPv6 address (e.g., `::1`), the library should treat it as an explicit hostname and construct valid URLs.
Observed behaviour
`getPrimaryDomainFromEndpoint('::1')` correctly identifies the address as an explicit hostname via `isFqdnIpOrLocalhost`, but URL construction produces `https://::1:443/time` instead of the valid `https://[::1]:443/time`. The missing brackets cause an "Invalid URI" error.
Failing test
| Test |
Expected |
Actual |
| `REC1b2 - endpoint as IPv6 address` |
Valid request to `[::1]` |
`Invalid URI: https://::1:443/time` |
Reproduction
```bash
RUN_DEVIATIONS=1 npx mocha --grep "REC1b2" test/uts/rest/fallback.test.ts
```
From PR #2191, branch `uts-rest`.
┆Issue is synchronized with this Jira Task by Unito
Spec point
Observed behaviour
`getPrimaryDomainFromEndpoint('::1')` correctly identifies the address as an explicit hostname via `isFqdnIpOrLocalhost`, but URL construction produces `https://::1:443/time` instead of the valid `https://[::1]:443/time`. The missing brackets cause an "Invalid URI" error.
Failing test
Reproduction
```bash
RUN_DEVIATIONS=1 npx mocha --grep "REC1b2" test/uts/rest/fallback.test.ts
```
From PR #2191, branch `uts-rest`.
┆Issue is synchronized with this Jira Task by Unito