Procházet zdrojové kódy

Fix issue with trailing slashes in MacOS (#292)

* Fix issue with trailing slashes in MacOS
Matthew Gerstman před 8 roky
rodič
revize
b5698e658d
1 změnil soubory, kde provedl 7 přidání a 0 odebrání
  1. 7 0
      restapi.go

+ 7 - 0
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
 }