From b5698e658d8bf72f46d5b334d8ea39642f3b1049 Mon Sep 17 00:00:00 2001 From: Matthew Gerstman Date: Sun, 27 Nov 2016 23:48:33 -0500 Subject: [PATCH] Fix issue with trailing slashes in MacOS (#292) * Fix issue with trailing slashes in MacOS --- restapi.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/restapi.go b/restapi.go index f4ffaf1..a54dfe8 100644 --- a/restapi.go +++ b/restapi.go @@ -1399,5 +1399,12 @@ func (s *Session) Gateway() (gateway string, err error) { } gateway = temp.URL + + // Ensure the gateway always has a trailing slash. + // MacOS will fail to connect if we add query params without a trailing slash on the base domain. + if !strings.HasSuffix(gateway, "/") { + gateway += "/" + } + return }