@ -294,7 +294,7 @@ func (h minioReservedBucketHandler) ServeHTTP(w http.ResponseWriter, r *http.Req
default :
default :
// For all other requests reject access to reserved
// For all other requests reject access to reserved
// buckets
// buckets
bucketName , _ := urlPath 2BucketObjectName( r . URL . Path )
bucketName , _ := request 2BucketObjectName( r )
if isMinioReservedBucket ( bucketName ) || isMinioMetaBucket ( bucketName ) {
if isMinioReservedBucket ( bucketName ) || isMinioMetaBucket ( bucketName ) {
writeErrorResponse ( context . Background ( ) , w , errorCodes . ToAPIErr ( ErrAllAccessDisabled ) , r . URL , guessIsBrowserReq ( r ) )
writeErrorResponse ( context . Background ( ) , w , errorCodes . ToAPIErr ( ErrAllAccessDisabled ) , r . URL , guessIsBrowserReq ( r ) )
return
return
@ -494,7 +494,7 @@ var notimplementedObjectResourceNames = map[string]bool{
// Resource handler ServeHTTP() wrapper
// Resource handler ServeHTTP() wrapper
func ( h resourceHandler ) ServeHTTP ( w http . ResponseWriter , r * http . Request ) {
func ( h resourceHandler ) ServeHTTP ( w http . ResponseWriter , r * http . Request ) {
bucketName , objectName := urlPath 2BucketObjectName( r . URL . Path )
bucketName , objectName := request 2BucketObjectName( r )
// If bucketName is present and not objectName check for bucket level resource queries.
// If bucketName is present and not objectName check for bucket level resource queries.
if bucketName != "" && objectName == "" {
if bucketName != "" && objectName == "" {
@ -696,7 +696,8 @@ func (f bucketForwardingHandler) ServeHTTP(w http.ResponseWriter, r *http.Reques
return
return
}
}
bucket , object := urlPath2BucketObjectName ( r . URL . Path )
bucket , object := request2BucketObjectName ( r )
// ListBucket requests should be handled at current endpoint as
// ListBucket requests should be handled at current endpoint as
// all buckets data can be fetched from here.
// all buckets data can be fetched from here.
if r . Method == http . MethodGet && bucket == "" && object == "" {
if r . Method == http . MethodGet && bucket == "" && object == "" {