Clean up slash suffix on -host value

This commit is contained in:
Jeff Mitchell committed 2020-10-01 12:19:06 -04:00
1 parent c3b4337b91
commit bf30a735dc
1 file changed
+1
+1
View File
@@ -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)