diff options
-rw-r--r-- | pipkin.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -72,7 +72,7 @@ type Contents struct { } // Headers we receive from clients and forward on to S3 endpoints. -var ALLOWED_REQUEST_HEADERS = []string{ +var ALLOWED_REQUEST_HEADERS = [...]string{ "accept", "accept-encoding", "accept-language", @@ -90,7 +90,7 @@ var ALLOWED_REQUEST_HEADERS = []string{ } // Headers we receive from S3 and send back to requesting clients. -var ALLOWED_RESPONSE_HEADERS = []string{ +var ALLOWED_RESPONSE_HEADERS = [...]string{ "accept-ranges", "content-encoding", "content-length", @@ -350,7 +350,7 @@ func (pk *Pipkin) presignQuery(method string, host Host, key string) (string, er uri.Add("X-Amz-Date", amzDateLong) uri.Add("X-Amz-Expires", amzExpires) uri.Add("X-Amz-SignedHeaders", amzSignedHeaders) - if amzPrefix != "" { + if strings.HasSuffix(amzResource, "/") { uri.Add("list-type", "2") uri.Add("max-keys", "50000") uri.Add("prefix", amzPrefix) |