Skip to content

fix: format of IPv6 address logged at PostgREST startup#4291

Merged
steve-chavez merged 1 commit into
PostgREST:mainfrom
taimoorzaeem:fix/ipv6-log-msg
Aug 29, 2025
Merged

fix: format of IPv6 address logged at PostgREST startup#4291
steve-chavez merged 1 commit into
PostgREST:mainfrom
taimoorzaeem:fix/ipv6-log-msg

Conversation

@taimoorzaeem
Copy link
Copy Markdown
Member

@taimoorzaeem taimoorzaeem commented Aug 29, 2025

The IPv6 address logged at the startup like ::1:80 was wrong because the port isn't clearly separated. This commit corrects it, now logging as [::1]:80 as discussed in #4288 (comment).

This also allows the refactor on #4288 to go smoothly without changing any behavior.

Comment thread src/PostgREST/Network.hs
The IPv6 address logged at the startup like `::1:80` was
wrong because the port isn't clearly separated. This commit
corrects it, now logging as `[::1]:80`.

This is done in accordance to RFC 3986. In short, we did this
have a clear separation between the port and host because
the components of an IPv6 are separated with the ':' character.

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
@steve-chavez steve-chavez merged commit 7a2840f into PostgREST:main Aug 29, 2025
33 checks passed
@wolfgangwalther
Copy link
Copy Markdown
Member

Backported to v13.

@taimoorzaeem taimoorzaeem deleted the fix/ipv6-log-msg branch August 30, 2025 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants