diff options
| author | Damien Neil <dneil@google.com> | 2026-03-24 14:19:02 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-03-25 08:29:36 -0700 |
| commit | b8dea877130ee6b80df1c468952ec5d13de9c16a (patch) | |
| tree | 1c1399a5347fb54572e28dcb701a3dc53bbf15fd /src/database/sql/sql.go | |
| parent | 068f27a8e06e58361bcc2d5e7d17deafab4b52bc (diff) | |
| download | go-b8dea877130ee6b80df1c468952ec5d13de9c16a.tar.xz | |
net/url: escape // at start of Path when OmitHost set
When a URL has OmitHost set and a Path starting with //,
escape the first / in the path to avoid emitting a URL
with the host set from the Path.
For example for
u := url.URL{Scheme: "file", OmitHost: true, Path: "//host/path"}
u.String is now "file:%2F/host/path", not "file://host/path".
Fixes #78328
Change-Id: I017af26724cc55f8b7e6f7c969f1495b6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/758881
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/database/sql/sql.go')
0 files changed, 0 insertions, 0 deletions
