16392: Add trailing slash to URLs like https://example in configs.
[arvados.git] / sdk / go / arvados / config.go
index 38de6b8ea40983081a14db18b270e3db31a6a895..69de3f05e231d29321ddbaa0b0f5f6dc1d5659e0 100644 (file)
@@ -303,6 +303,10 @@ func (su *URL) UnmarshalText(text []byte) error {
        u, err := url.Parse(string(text))
        if err == nil {
                *su = URL(*u)
+               if su.Path == "" && su.Host != "" {
+                       // http://example really means http://example/
+                       su.Path = "/"
+               }
        }
        return err
 }