Skip to content

Commit a32ea33

Browse files
authored
fix(NewClient): support https:// URLs (#277)
* fix(NewClient): support https:// URLs We don't hardcode any specific ports, but assume `http://` (backward-compatible behavior) unless `https://` is passed (then we keep it as-is). * chore: v0.14.1 this is backward-compatible fix, ok to just bump patch
1 parent 2432d3e commit a32ea33

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: http/client.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ func ClientWithRawAbsPath(rawAbsPath bool) ClientOpt {
8585

8686
// NewClient constructs a new HTTP-backed command executor.
8787
func NewClient(address string, opts ...ClientOpt) cmds.Executor {
88-
if !strings.HasPrefix(address, "http://") {
88+
// default to HTTP to keep backward-compatible behavior, but keep https:// if passed
89+
if !strings.HasPrefix(address, "http:") && !strings.HasPrefix(address, "https:") {
8990
address = "http://" + address
9091
}
9192

Diff for: version.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "v0.14.0"
2+
"version": "v0.14.1"
33
}

0 commit comments

Comments
 (0)