]> Cypherpunks repositories - gostls13.git/commit
net/url: permit colons in the host of postgresql:// URLs
authorDamien Neil <dneil@google.com>
Wed, 19 Nov 2025 23:32:04 +0000 (15:32 -0800)
committerDamien Neil <dneil@google.com>
Thu, 20 Nov 2025 22:25:21 +0000 (14:25 -0800)
commitff654ea1000af81bd08f24faf06c2113e8df001a
tree636051d37d5576416b828904c34477dd508adcff
parenta662badab918d7708bbc750f24b9c7313520e2b0
net/url: permit colons in the host of postgresql:// URLs

PostgreSQL's postgresql:// URL scheme permits a comma-separated list of
host:ports to appear in the host subcomponent:
https://www.postgresql.org/docs/11/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS

While this is not compliant with RFC 3986, it's something we've accepted
for a long time. Continue to accept colons in the host when the URL
scheme is "postgresql".

Fixes #75859

Change-Id: Iaa2e82b0be11d8e034e10dd7f4d6070039acfa2c
Reviewed-on: https://go-review.googlesource.com/c/go/+/722300
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
src/net/url/url.go
src/net/url/url_test.go