Add proper content-length for error and success responses

- All compliance issues with S3 API for Put,Get,List (Bucket,Object) respectively
 - Encodes and returns back proper HTTP headers
This commit is contained in:
Harshavardhana
2015-04-29 15:28:04 -07:00
parent c8db3e1c3b
commit 92e4301414
7 changed files with 117 additions and 64 deletions
+2
View File
@@ -40,6 +40,8 @@ func setCommonHeaders(w http.ResponseWriter, acceptsType string) {
w.Header().Set("Accept-Ranges", "bytes")
w.Header().Set("Content-Type", acceptsType)
w.Header().Set("Connection", "close")
// should be set to '0' by default
w.Header().Set("Content-Length", "0")
}
// Write error response headers