diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 245d2d0c..ba76880e 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -36,7 +36,7 @@ }, { "ImportPath": "github.com/minio/objectstorage-go", - "Rev": "3a8c0c3b348ad327f1e9ec69c3ab07ce327ff796" + "Rev": "22b92be8f38740a5cf4cb81d7f3b5b178febfa68" }, { "ImportPath": "github.com/shiena/ansicolor", diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/README.md b/Godeps/_workspace/src/github.com/minio/objectstorage-go/README.md index bbf6f5a3..1eb36c3c 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/README.md +++ b/Godeps/_workspace/src/github.com/minio/objectstorage-go/README.md @@ -1,5 +1,7 @@ # Minimal object storage library in Go +[![Build Status](https://travis-ci.org/minio/objectstorage-go.svg)](https://travis-ci.org/minio/objectstorage-go) + ## Install ```go @@ -14,11 +16,6 @@ * Community hangout on Gitter [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/minio/minio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) * Ask questions on Quora [![Quora](http://upload.wikimedia.org/wikipedia/commons/thumb/5/57/Quora_logo.svg/55px-Quora_logo.svg.png)](http://www.quora.com/Minio) -## Roadmap - -- Add v4 signature support -- Add s3 multi region support - ## Contribute [Contribute to minimal object storage library](./CONTRIBUTING.md) diff --git a/Godeps/_workspace/src/github.com/minio/objectstorage-go/api.go b/Godeps/_workspace/src/github.com/minio/objectstorage-go/api.go index 52457a59..c8aa9fbd 100644 --- a/Godeps/_workspace/src/github.com/minio/objectstorage-go/api.go +++ b/Godeps/_workspace/src/github.com/minio/objectstorage-go/api.go @@ -131,7 +131,8 @@ type Config struct { // MustGetEndpoint makes sure that a valid endpoint is provided all the time, even with false regions it will fall // back to default, for no regions specified it chooses to default to "milkyway" and use endpoint as is func (c *Config) MustGetEndpoint() string { - if strings.TrimSpace(c.Endpoint) != "" && strings.TrimSpace(c.Region) == "" { + switch { + case strings.TrimSpace(c.Endpoint) != "" && strings.TrimSpace(c.Region) == "": if strings.Contains(strings.TrimSpace(c.Endpoint), "s3.amazonaws.com") { c.Region = "us-east-1" return getEndpoint(c.Region) @@ -139,16 +140,14 @@ func (c *Config) MustGetEndpoint() string { // for custom domains, there are no regions default to 'milkyway' c.Region = "milkyway" return c.Endpoint - } // if valid region provided override user provided endpoint - if strings.TrimSpace(c.Region) != "" { + case strings.TrimSpace(c.Region) != "": if endpoint := getEndpoint(strings.TrimSpace(c.Region)); endpoint != "" { c.Endpoint = endpoint return c.Endpoint } - // fall back if region is set and not found, go through US-standard - c.Region = "us-east-1" - return getEndpoint(c.Region) + // fall back to custom Endpoint, if no valid region can be found + return c.Endpoint } // if not endpoint or region sepcified default to us-east-1 c.Region = "us-east-1" diff --git a/pkg/client/s3/s3.go b/pkg/client/s3/s3.go index b03fcdb6..673e3012 100644 --- a/pkg/client/s3/s3.go +++ b/pkg/client/s3/s3.go @@ -81,7 +81,7 @@ func New(config *Config) client.Client { var transport http.RoundTripper switch { case config.Debug == true: - transport = GetNewTraceTransport(nil, GetNewTraceTransport(NewTrace(true, true, nil), http.DefaultTransport)) + transport = GetNewTraceTransport(nil, GetNewTraceTransport(NewTrace(false, true, nil), http.DefaultTransport)) default: transport = http.DefaultTransport }