Implement S3 Style ErrorCodes and Response

This patchset also brings in lot of cleanup in terms of minioapi codebase
This commit is contained in:
Harshavardhana committed 2015-02-11 21:27:28 -08:00
1 parent 6e73ccec75
commit ac4f07906c
7 files changed
+532 -170

No files matched your search

+2
View File
@@ -21,6 +21,7 @@ import (
"crypto/sha256"
"fmt"
"io"
"log"
"sort"
"strings"
"time"
@@ -51,6 +52,7 @@ func (storage *storage) CopyObjectToWriter(w io.Writer, bucket string, object st
if val, ok := storage.objectdata[key]; ok {
objectBuffer := bytes.NewBuffer(val.data)
written, err := io.Copy(w, objectBuffer)
log.Println("I am here")
return written, err
} else {
return 0, mstorage.ObjectNotFound{Bucket: bucket, Object: object}