From 606452e2fc9aa6e80262dac0a35903df2e5106b4 Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Mon, 24 Jul 2023 17:45:33 -0400 Subject: [PATCH] Backport of NET-4897 - update comment to include the current issue url from the go team. into release/1.15.x (#18265) backport of commit 23f0cfc2d6955bcb599cca56b14dc76cc41d5320 Co-authored-by: John Murret --- api/api.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/api.go b/api/api.go index 1d4f201621..50410f471f 100644 --- a/api/api.go +++ b/api/api.go @@ -989,8 +989,10 @@ func (r *request) toHTTP() (*http.Request, error) { // this is required since go started validating req.host in 1.20.6 and 1.19.11. // prior to that they would strip out the slashes for you. They removed that // behavior and added more strict validation as part of a CVE. - // https://github.com/golang/go/issues/60374 - // the hope is that + // This issue is being tracked by the Go team: + // https://github.com/golang/go/issues/61431 + // If there is a resolution in this issue, we will remove this code. + // In the time being, this is the accepted workaround. if strings.HasPrefix(r.url.Host, "/") { r.url.Host = "localhost" }