From 0540863663b9f515a0a5bd803af34adca08468dc Mon Sep 17 00:00:00 2001 From: Bala FA Date: Tue, 5 Jul 2016 07:51:15 +0530 Subject: [PATCH] fix: use readSizeV1 wherever applicable. (#2093) --- bucket-policy-handlers.go | 2 +- fs-v1-multipart.go | 2 +- fs-v1.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bucket-policy-handlers.go b/bucket-policy-handlers.go index 1e967e46d..8e77b8ce9 100644 --- a/bucket-policy-handlers.go +++ b/bucket-policy-handlers.go @@ -27,7 +27,7 @@ import ( ) // maximum supported access policy size. -const maxAccessPolicySize = 20 * 1024 * 1024 // 20KiB. +const maxAccessPolicySize = 20 * 1024 // 20KiB. // Verify if a given action is valid for the url path based on the // existing bucket access policy. diff --git a/fs-v1-multipart.go b/fs-v1-multipart.go index aff58892d..745786f14 100644 --- a/fs-v1-multipart.go +++ b/fs-v1-multipart.go @@ -295,7 +295,7 @@ func (fs fsObjects) PutObjectPart(bucket, object, uploadID string, partID int, s md5Writer := md5.New() // Allocate 32KiB buffer for staging buffer. - var buf = make([]byte, 128*1024) + var buf = make([]byte, readSizeV1) for { n, err := io.ReadFull(data, buf) if err == io.EOF { diff --git a/fs-v1.go b/fs-v1.go index 42c44b85a..225048781 100644 --- a/fs-v1.go +++ b/fs-v1.go @@ -323,7 +323,7 @@ func (fs fsObjects) PutObject(bucket string, object string, size int64, data io. } } else { // Allocate a buffer to Read() the object upload stream. - buf := make([]byte, 32*1024) + buf := make([]byte, readSizeV1) // Read the buffer till io.EOF and append the read data to // the temporary file. for {