From a32ea331b2d26745053f85fc3b888a15133b4f2d Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 10 Jan 2025 21:12:52 +0100 Subject: [PATCH] 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 --- http/client.go | 3 ++- version.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/http/client.go b/http/client.go index 14ae8e4c..cd0e8508 100644 --- a/http/client.go +++ b/http/client.go @@ -85,7 +85,8 @@ func ClientWithRawAbsPath(rawAbsPath bool) ClientOpt { // NewClient constructs a new HTTP-backed command executor. func NewClient(address string, opts ...ClientOpt) cmds.Executor { - if !strings.HasPrefix(address, "http://") { + // default to HTTP to keep backward-compatible behavior, but keep https:// if passed + if !strings.HasPrefix(address, "http:") && !strings.HasPrefix(address, "https:") { address = "http://" + address } diff --git a/version.json b/version.json index 7dd7b578..f49d0df9 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "v0.14.0" + "version": "v0.14.1" }