From bf30a735dcfb8713ef482d3e333509664d670afe Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 1 Oct 2020 12:19:06 -0400 Subject: [PATCH] Clean up slash suffix on -host value --- internal/cmd/commands/proxy/proxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/cmd/commands/proxy/proxy.go b/internal/cmd/commands/proxy/proxy.go index be8856d2df..cc66be4eae 100644 --- a/internal/cmd/commands/proxy/proxy.go +++ b/internal/cmd/commands/proxy/proxy.go @@ -799,6 +799,7 @@ func (c *Command) handleExec(passthroughArgs []string) { } var uri string if c.flagHttpHost != "" { + c.flagHttpHost = strings.TrimSuffix(c.flagHttpHost, "/") args = append(args, "-H", fmt.Sprintf("Host: %s", c.flagHttpHost)) args = append(args, "--resolve", fmt.Sprintf("%s:%s:%s", c.flagHttpHost, port, ip)) uri = fmt.Sprintf("%s://%s:%s", c.flagHttpScheme, c.flagHttpHost, port)