mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
s3: Fix compliance bugs reported by s3verify. (#2624)
- Fixes couple of error strings reported are mismatching. - Fixes a error HTTP status which was wrong fixed. - Remove usage of an deprecated PostResponse, au contraire to their documentation there is no response body in PostPolicy.
This commit is contained in:
@@ -387,18 +387,15 @@ func (api objectAPIHandlers) PostPolicyBucketHandler(w http.ResponseWriter, r *h
|
||||
if md5Sum != "" {
|
||||
w.Header().Set("ETag", "\""+md5Sum+"\"")
|
||||
}
|
||||
encodedSuccessResponse := encodeResponse(PostResponse{
|
||||
Location: getObjectLocation(bucket, object), // TODO Full URL is preferred
|
||||
Bucket: bucket,
|
||||
Key: object,
|
||||
ETag: md5Sum,
|
||||
})
|
||||
|
||||
// TODO full URL is preferred.
|
||||
w.Header().Set("Location", getObjectLocation(bucket, object))
|
||||
|
||||
// Set common headers.
|
||||
setCommonHeaders(w)
|
||||
|
||||
// Write successful response.
|
||||
writeSuccessResponse(w, encodedSuccessResponse)
|
||||
writeSuccessNoContent(w)
|
||||
|
||||
if eventN.IsBucketNotificationSet(bucket) {
|
||||
// Fetch object info for notifications.
|
||||
|
||||
Reference in New Issue
Block a user