|
|
|
@ -44,10 +44,6 @@ func (api API) GetObjectHandler(w http.ResponseWriter, req *http.Request) { |
|
|
|
|
<-op.ProceedCh |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if !api.isValidOp(w, req) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var object, bucket string |
|
|
|
|
vars := mux.Vars(req) |
|
|
|
|
bucket = vars["bucket"] |
|
|
|
@ -96,10 +92,6 @@ func (api API) HeadObjectHandler(w http.ResponseWriter, req *http.Request) { |
|
|
|
|
<-op.ProceedCh |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if !api.isValidOp(w, req) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var object, bucket string |
|
|
|
|
vars := mux.Vars(req) |
|
|
|
|
bucket = vars["bucket"] |
|
|
|
@ -139,10 +131,6 @@ func (api API) PutObjectHandler(w http.ResponseWriter, req *http.Request) { |
|
|
|
|
<-op.ProceedCh |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if !api.isValidOp(w, req) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var object, bucket string |
|
|
|
|
vars := mux.Vars(req) |
|
|
|
|
bucket = vars["bucket"] |
|
|
|
@ -243,10 +231,6 @@ func (api API) NewMultipartUploadHandler(w http.ResponseWriter, req *http.Reques |
|
|
|
|
<-op.ProceedCh |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if !api.isValidOp(w, req) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if !isRequestUploads(req.URL.Query()) { |
|
|
|
|
writeErrorResponse(w, req, MethodNotAllowed, req.URL.Path) |
|
|
|
|
return |
|
|
|
@ -288,10 +272,6 @@ func (api API) PutObjectPartHandler(w http.ResponseWriter, req *http.Request) { |
|
|
|
|
<-op.ProceedCh |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if !api.isValidOp(w, req) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// get Content-MD5 sent by client and verify if valid
|
|
|
|
|
md5 := req.Header.Get("Content-MD5") |
|
|
|
|
if !isValidMD5(md5) { |
|
|
|
@ -391,10 +371,6 @@ func (api API) AbortMultipartUploadHandler(w http.ResponseWriter, req *http.Requ |
|
|
|
|
<-op.ProceedCh |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if !api.isValidOp(w, req) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
vars := mux.Vars(req) |
|
|
|
|
bucket := vars["bucket"] |
|
|
|
|
object := vars["object"] |
|
|
|
@ -427,10 +403,6 @@ func (api API) ListObjectPartsHandler(w http.ResponseWriter, req *http.Request) |
|
|
|
|
<-op.ProceedCh |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if !api.isValidOp(w, req) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
objectResourcesMetadata := getObjectResources(req.URL.Query()) |
|
|
|
|
if objectResourcesMetadata.PartNumberMarker < 0 { |
|
|
|
|
writeErrorResponse(w, req, InvalidPartNumberMarker, req.URL.Path) |
|
|
|
@ -478,10 +450,6 @@ func (api API) CompleteMultipartUploadHandler(w http.ResponseWriter, req *http.R |
|
|
|
|
<-op.ProceedCh |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if !api.isValidOp(w, req) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
vars := mux.Vars(req) |
|
|
|
|
bucket := vars["bucket"] |
|
|
|
|
object := vars["object"] |
|
|
|
|