From 2559614bfde1d338dc206d0dd56df68c6eeab235 Mon Sep 17 00:00:00 2001 From: poornas Date: Mon, 5 Jun 2017 08:11:54 -0700 Subject: [PATCH] fix: Set UIversion in reply for policy API (#4469) --- cmd/web-handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/web-handlers.go b/cmd/web-handlers.go index bc4992e2e..99f74333f 100644 --- a/cmd/web-handlers.go +++ b/cmd/web-handlers.go @@ -773,6 +773,8 @@ type SetBucketPolicyArgs struct { // SetBucketPolicy - set bucket policy. func (web *webAPIHandlers) SetBucketPolicy(r *http.Request, args *SetBucketPolicyArgs, reply *WebGenericRep) error { objectAPI := web.ObjectAPI() + reply.UIVersion = browser.UIVersion + if objectAPI == nil { return toJSONError(errServerNotInitialized) } @@ -804,7 +806,6 @@ func (web *webAPIHandlers) SetBucketPolicy(r *http.Request, args *SetBucketPolic if err != nil { return toJSONError(err) } - reply.UIVersion = browser.UIVersion return nil } @@ -813,7 +814,6 @@ func (web *webAPIHandlers) SetBucketPolicy(r *http.Request, args *SetBucketPolic if err != nil { return toJSONError(err, args.BucketName) } - reply.UIVersion = browser.UIVersion return nil } data, err := json.Marshal(policyInfo)