Skip to content

Commit cfdc1ff

Browse files
committed
Use --connect-to without host:port restriction
1 parent ec9afb6 commit cfdc1ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

render/httpmodel.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func (r *HTTPRequest) CurlCommand(scheme string, backend *Backend) string {
176176
// --connect-to HOST1:PORT1:HOST2:PORT2
177177
// when you would connect to HOST1:PORT1, actually connect to HOST2:PORT2
178178
if backend != nil {
179-
s.WriteString(fmt.Sprintf(" \\\n "+`--connect-to "%s:%s:%s"`, hostURL, escapeDoubleQuotes(backend.host), backend.port))
179+
s.WriteString(fmt.Sprintf(" \\\n "+`--connect-to "::%s:%s"`, escapeDoubleQuotes(backend.host), backend.port))
180180
}
181181

182182
return s.String()
@@ -235,8 +235,8 @@ func (r *HTTPRequest) HurlFile(scheme string, backend *Backend) string {
235235
// when you would connect to HOST1:PORT1, actually connect to HOST2:PORT2
236236
if backend != nil {
237237
s.WriteString("\n# To connect to the backend run the hurl file as:\n")
238-
s.WriteString(fmt.Sprintf(`# hurl --connect-to "%s:%s:%s" file.hurl`,
239-
escapeDoubleQuotes(hostURL), escapeDoubleQuotes(backend.host), backend.port,
238+
s.WriteString(fmt.Sprintf(`# hurl --connect-to "::%s:%s" file.hurl`,
239+
escapeDoubleQuotes(backend.host), backend.port,
240240
))
241241
}
242242

0 commit comments

Comments
 (0)