Now share URL works with minio server

This commit is contained in:
Harshavardhana
2015-10-01 10:27:42 -07:00
parent acf5be8d16
commit e1351bb998
4 changed files with 48 additions and 6 deletions
+2 -2
View File
@@ -41,8 +41,8 @@
"canonical": "github.com/minio/minio-go",
"comment": "",
"local": "vendor/github.com/minio/minio-go",
"revision": "8cd66490f49b893c83bdbbc4c8cea047bed7cdd6",
"revisionTime": "2015-09-22T23:49:08-07:00"
"revision": "7b215c6781d0bf99bdf2182afd47bc4633cf67aa",
"revisionTime": "2015-10-01T10:26:02-07:00"
},
{
"canonical": "github.com/minio/minio-go-legacy",
+3 -1
View File
@@ -1,6 +1,6 @@
# Minio Go Library for Amazon S3 Compatible Cloud Storage [![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)
## Install [![Build Status](https://travis-ci.org/minio/minio-go.svg)](https://travis-ci.org/minio/minio-go)
## Install
```sh
$ go get github.com/minio/minio-go
@@ -62,3 +62,5 @@ func main() {
## Contribute
[Contributors Guide](./CONTRIBUTING.md)
[![Build Status](https://travis-ci.org/minio/minio-go.svg)](https://travis-ci.org/minio/minio-go) [![Build status](https://ci.appveyor.com/api/projects/status/1ep7n2resn6fk1w6?svg=true)](https://ci.appveyor.com/project/harshavardhana/minio-go)
+41
View File
@@ -0,0 +1,41 @@
# version format
version: "{build}"
# Operating system (build VM template)
os: Windows Server 2012 R2
clone_folder: c:\gopath\src\github.com\minio\minio-go
# environment variables
environment:
GOPATH: c:\gopath
GO15VENDOREXPERIMENT: 1
# scripts that run after cloning repository
install:
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
- rmdir c:\go /s /q
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.5.1.windows-amd64.msi
- msiexec /i go1.5.1.windows-amd64.msi /q
- go version
- go env
- go get -u github.com/golang/lint/golint
- go get -u golang.org/x/tools/cmd/vet
- go get -u github.com/fzipp/gocyclo
- go get -u github.com/remyoudompheng/go-misc/deadcode
# to run your custom scripts instead of automatic MSBuild
build_script:
- go vet ./...
- gofmt -s -l .
- golint github.com/minio/minio-go...
- gocyclo -over 30 .
- deadcode
- go test
- go test -race
# to disable automatic tests
test: off
# to disable deployment
deploy: off
+2 -3
View File
@@ -348,9 +348,8 @@ func (r *request) getHashedPayload() string {
}
}
hashedPayload := hash()
r.req.Header.Set("X-Amz-Content-Sha256", hashedPayload)
if hashedPayload == "UNSIGNED-PAYLOAD" {
r.req.Header.Set("X-Amz-Content-Sha256", "")
if hashedPayload != "UNSIGNED-PAYLOAD" {
r.req.Header.Set("X-Amz-Content-Sha256", hashedPayload)
}
return hashedPayload
}