Reply back proper statuses for DeleteBucket/DeleteObject

This commit is contained in:
Harshavardhana
2015-10-16 20:02:37 -07:00
parent f825a32b53
commit 704fa420a3
5 changed files with 12 additions and 6 deletions
+6
View File
@@ -212,6 +212,12 @@ func writeSuccessResponse(w http.ResponseWriter) {
w.WriteHeader(http.StatusOK)
}
// writeSuccessNoContent write success headers with http status 204
func writeSuccessNoContent(w http.ResponseWriter) {
setCommonHeaders(w, 0)
w.WriteHeader(http.StatusNoContent)
}
// writeErrorRespone write error headers
func writeErrorResponse(w http.ResponseWriter, req *http.Request, errorType int, resource string) {
error := getErrorCode(errorType)