Set notification namespace for NotificationConfiguration (#6789)

This commit is contained in:
Harshavardhana
2018-11-09 10:40:03 -08:00
committed by kannappanr
parent c872c1f1dc
commit b24b320807
2 changed files with 6 additions and 0 deletions

View File

@@ -83,6 +83,11 @@ func (api objectAPIHandlers) GetBucketNotificationHandler(w http.ResponseWriter,
nConfig = &event.Config{}
}
// If xml namespace is empty, set a default value before returning.
if nConfig.XMLNS == "" {
nConfig.XMLNS = "http://s3.amazonaws.com/doc/2006-03-01/"
}
notificationBytes, err := xml.Marshal(nConfig)
if err != nil {
logger.LogIf(ctx, err)