|
@ -63,6 +63,14 @@ func (s3a *S3ApiServer) ListObjectsV2Handler(w http.ResponseWriter, r *http.Requ |
|
|
writeErrorResponse(w, s3err.ErrInternalError, r.URL) |
|
|
writeErrorResponse(w, s3err.ErrInternalError, r.URL) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if len(response.Contents) == 0 { |
|
|
|
|
|
if exists, existErr := s3a.exists(s3a.option.BucketsPath, bucket, true); existErr == nil && !exists { |
|
|
|
|
|
writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
responseV2 := &ListBucketResultV2{ |
|
|
responseV2 := &ListBucketResultV2{ |
|
|
XMLName: response.XMLName, |
|
|
XMLName: response.XMLName, |
|
|
Name: response.Name, |
|
|
Name: response.Name, |
|
@ -106,6 +114,13 @@ func (s3a *S3ApiServer) ListObjectsV1Handler(w http.ResponseWriter, r *http.Requ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if len(response.Contents) == 0 { |
|
|
|
|
|
if exists, existErr := s3a.exists(s3a.option.BucketsPath, bucket, true); existErr == nil && !exists { |
|
|
|
|
|
writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
writeSuccessResponseXML(w, encodeResponse(response)) |
|
|
writeSuccessResponseXML(w, encodeResponse(response)) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|