mirror of
https://github.com/minio/minio.git
synced 2024-12-26 07:05:55 -05:00
Set notification namespace for NotificationConfiguration (#6789)
This commit is contained in:
parent
c872c1f1dc
commit
b24b320807
@ -83,6 +83,11 @@ func (api objectAPIHandlers) GetBucketNotificationHandler(w http.ResponseWriter,
|
|||||||
nConfig = &event.Config{}
|
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)
|
notificationBytes, err := xml.Marshal(nConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.LogIf(ctx, err)
|
logger.LogIf(ctx, err)
|
||||||
|
@ -204,6 +204,7 @@ type topic struct {
|
|||||||
// Config - notification configuration described in
|
// Config - notification configuration described in
|
||||||
// http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
|
// http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
XMLNS string `xml:"xmlns,attr,omitempty"`
|
||||||
XMLName xml.Name `xml:"NotificationConfiguration"`
|
XMLName xml.Name `xml:"NotificationConfiguration"`
|
||||||
QueueList []Queue `xml:"QueueConfiguration,omitempty"`
|
QueueList []Queue `xml:"QueueConfiguration,omitempty"`
|
||||||
LambdaList []lambda `xml:"CloudFunctionConfiguration,omitempty"`
|
LambdaList []lambda `xml:"CloudFunctionConfiguration,omitempty"`
|
||||||
|
Loading…
Reference in New Issue
Block a user