From eaec7b356d2007746ba8500c014a00594332d0ec Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 3 Aug 2015 23:04:33 -0700 Subject: [PATCH] Fix signature issues, in-turn fixing mirror issues --- Godeps/Godeps.json | 12 ++++++------ .../github.com/dustin/go-humanize/bigbytes.go | 2 +- .../dustin/go-humanize/bigbytes_test.go | 4 ++-- .../src/github.com/dustin/go-humanize/bytes.go | 2 +- .../dustin/go-humanize/bytes_test.go | 6 +++--- .../src/github.com/dustin/go-humanize/comma.go | 2 +- .../src/github.com/minio/minio-go/common.go | 2 +- .../src/github.com/minio/minio-go/request.go | 18 ++++++++++++++++++ .../github.com/minio/minio/pkg/probe/probe.go | 3 +++ .../_workspace/src/gopkg.in/check.v1/check.go | 2 +- 10 files changed, 37 insertions(+), 16 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 03deff95..d2232a90 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -7,7 +7,7 @@ "Deps": [ { "ImportPath": "github.com/dustin/go-humanize", - "Rev": "00897f070f09f194c26d65afae734ba4c32404e8" + "Rev": "c128122e0b9b93799aef8181a537e5d8fd7081d6" }, { "ImportPath": "github.com/fatih/color", @@ -29,13 +29,13 @@ }, { "ImportPath": "github.com/minio/minio-go", - "Comment": "v0.2.0-12-g20db439", - "Rev": "20db439bc6671562eeff32d4cc3381eb7e824671" + "Comment": "v0.2.0-16-gd4b3d1e", + "Rev": "d4b3d1ecfb717775481044e72cc10cc0d534dc0c" }, { "ImportPath": "github.com/minio/minio/pkg/probe", - "Comment": "release-1434511043-296-g7f13095", - "Rev": "7f1309526056653a8e07277b3e39bfc49766363a" + "Comment": "release-1434511043-300-g28d9565", + "Rev": "28d9565400d68ae1cd79b81075823f10775e6230" }, { "ImportPath": "github.com/minio/pb", @@ -56,7 +56,7 @@ }, { "ImportPath": "gopkg.in/check.v1", - "Rev": "11d3bc7aa68e238947792f30573146a3231fc0f1" + "Rev": "b3d3430320d4260e5fea99841af984b3badcea63" } ] } diff --git a/Godeps/_workspace/src/github.com/dustin/go-humanize/bigbytes.go b/Godeps/_workspace/src/github.com/dustin/go-humanize/bigbytes.go index 6876e92e..e4a814a9 100644 --- a/Godeps/_workspace/src/github.com/dustin/go-humanize/bigbytes.go +++ b/Godeps/_workspace/src/github.com/dustin/go-humanize/bigbytes.go @@ -115,7 +115,7 @@ func humanateBigBytes(s, base *big.Int, sizes []string) string { // // BigBytes(82854982) -> 83MB func BigBytes(s *big.Int) string { - sizes := []string{"B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"} + sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"} return humanateBigBytes(s, bigSIExp, sizes) } diff --git a/Godeps/_workspace/src/github.com/dustin/go-humanize/bigbytes_test.go b/Godeps/_workspace/src/github.com/dustin/go-humanize/bigbytes_test.go index a0f977a6..da367d41 100644 --- a/Godeps/_workspace/src/github.com/dustin/go-humanize/bigbytes_test.go +++ b/Godeps/_workspace/src/github.com/dustin/go-humanize/bigbytes_test.go @@ -86,8 +86,8 @@ func TestBigBytes(t *testing.T) { {"bytes(803)", bbyte(803), "803B"}, {"bytes(999)", bbyte(999), "999B"}, - {"bytes(1024)", bbyte(1024), "1.0KB"}, - {"bytes(1MB - 1)", bbyte(MByte - Byte), "1000KB"}, + {"bytes(1024)", bbyte(1024), "1.0kB"}, + {"bytes(1MB - 1)", bbyte(MByte - Byte), "1000kB"}, {"bytes(1MB)", bbyte(1024 * 1024), "1.0MB"}, {"bytes(1GB - 1K)", bbyte(GByte - KByte), "1000MB"}, diff --git a/Godeps/_workspace/src/github.com/dustin/go-humanize/bytes.go b/Godeps/_workspace/src/github.com/dustin/go-humanize/bytes.go index 4c4b5af1..b7a77b52 100644 --- a/Godeps/_workspace/src/github.com/dustin/go-humanize/bytes.go +++ b/Godeps/_workspace/src/github.com/dustin/go-humanize/bytes.go @@ -86,7 +86,7 @@ func humanateBytes(s uint64, base float64, sizes []string) string { // // Bytes(82854982) -> 83MB func Bytes(s uint64) string { - sizes := []string{"B", "KB", "MB", "GB", "TB", "PB", "EB"} + sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"} return humanateBytes(s, 1000, sizes) } diff --git a/Godeps/_workspace/src/github.com/dustin/go-humanize/bytes_test.go b/Godeps/_workspace/src/github.com/dustin/go-humanize/bytes_test.go index 76a594c1..7497fa00 100644 --- a/Godeps/_workspace/src/github.com/dustin/go-humanize/bytes_test.go +++ b/Godeps/_workspace/src/github.com/dustin/go-humanize/bytes_test.go @@ -80,9 +80,9 @@ func TestBytes(t *testing.T) { {"bytes(803)", Bytes(803), "803B"}, {"bytes(999)", Bytes(999), "999B"}, - {"bytes(1024)", Bytes(1024), "1.0KB"}, - {"bytes(9999)", Bytes(9999), "10KB"}, - {"bytes(1MB - 1)", Bytes(MByte - Byte), "1000KB"}, + {"bytes(1024)", Bytes(1024), "1.0kB"}, + {"bytes(9999)", Bytes(9999), "10kB"}, + {"bytes(1MB - 1)", Bytes(MByte - Byte), "1000kB"}, {"bytes(1MB)", Bytes(1024 * 1024), "1.0MB"}, {"bytes(1GB - 1K)", Bytes(GByte - KByte), "1000MB"}, diff --git a/Godeps/_workspace/src/github.com/dustin/go-humanize/comma.go b/Godeps/_workspace/src/github.com/dustin/go-humanize/comma.go index 9d0d2ed1..20711c15 100644 --- a/Godeps/_workspace/src/github.com/dustin/go-humanize/comma.go +++ b/Godeps/_workspace/src/github.com/dustin/go-humanize/comma.go @@ -18,7 +18,7 @@ func Comma(v int64) string { v = 0 - v } - parts := []string{"", "", "", "", "", "", "", ""} + parts := []string{"", "", "", "", "", "", ""} j := len(parts) - 1 for v > 999 { diff --git a/Godeps/_workspace/src/github.com/minio/minio-go/common.go b/Godeps/_workspace/src/github.com/minio/minio-go/common.go index 6263d559..774a544f 100644 --- a/Godeps/_workspace/src/github.com/minio/minio-go/common.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/common.go @@ -69,7 +69,7 @@ func urlEncodeName(name string) (string, error) { continue } switch s { - case '-', '_', '.', '~', '/': // §2.3 Unreserved characters (mark) + case '-', '_', '.', '~', '/', '+': // §2.3 Unreserved characters (mark) encodedName = encodedName + string(s) continue default: diff --git a/Godeps/_workspace/src/github.com/minio/minio-go/request.go b/Godeps/_workspace/src/github.com/minio/minio-go/request.go index 730b82d4..c24ca850 100644 --- a/Godeps/_workspace/src/github.com/minio/minio-go/request.go +++ b/Godeps/_workspace/src/github.com/minio/minio-go/request.go @@ -82,6 +82,23 @@ var ignoredHeaders = map[string]bool{ "User-Agent": true, } +func path2BucketAndObject(path string) (bucketName, objectName string) { + pathSplits := strings.SplitN(path, "?", 2) + splits := strings.SplitN(pathSplits[0], separator, 3) + switch len(splits) { + case 0, 1: + bucketName = "" + objectName = "" + case 2: + bucketName = splits[1] + objectName = "" + case 3: + bucketName = splits[1] + objectName = splits[2] + } + return bucketName, objectName +} + // path2Object gives objectName from URL path func path2Object(path string) (objectName string) { pathSplits := strings.SplitN(path, "?", 2) @@ -277,6 +294,7 @@ func (r *request) getCanonicalRequest(hashedPayload string) string { encodedPath, _ := urlEncodeName(r.req.URL.Path) // convert any space strings back to "+" encodedPath = strings.Replace(encodedPath, "+", "%20", -1) + encodedPath = strings.Replace(encodedPath, "%2B", "+", -1) canonicalRequest := strings.Join([]string{ r.req.Method, encodedPath, diff --git a/Godeps/_workspace/src/github.com/minio/minio/pkg/probe/probe.go b/Godeps/_workspace/src/github.com/minio/minio/pkg/probe/probe.go index 078d2391..957c3384 100644 --- a/Godeps/_workspace/src/github.com/minio/minio/pkg/probe/probe.go +++ b/Godeps/_workspace/src/github.com/minio/minio/pkg/probe/probe.go @@ -71,6 +71,9 @@ type Error struct { // trace the return path with Probe.Trace and finally handle reporting or quitting // at the top level. func New(e error) *Error { + if e == nil { + return nil + } Err := Error{sync.RWMutex{}, e, GetSysInfo(), []tracePoint{}} return Err.trace() } diff --git a/Godeps/_workspace/src/gopkg.in/check.v1/check.go b/Godeps/_workspace/src/gopkg.in/check.v1/check.go index c99392a2..f302a053 100644 --- a/Godeps/_workspace/src/gopkg.in/check.v1/check.go +++ b/Godeps/_workspace/src/gopkg.in/check.v1/check.go @@ -335,7 +335,7 @@ func (c *C) logPanic(skip int, value interface{}) { if name == "Value.call" && strings.HasSuffix(path, valueGo) { continue } - if (name == "call16" || name == "call32") && strings.Contains(path, asmGo) { + if name == "call16" && strings.Contains(path, asmGo) { continue } c.logf("%s:%d\n in %s", nicePath(file), line, name)