diff --git a/lib/AzuriteQueue.js b/lib/AzuriteQueue.js index 7750da3..8de10e1 100644 --- a/lib/AzuriteQueue.js +++ b/lib/AzuriteQueue.js @@ -4,7 +4,8 @@ const express = require('express'), env = require('./core/env'), bodyParser = require('body-parser'), morgan = require('morgan'), - cli = require('./core/cli'); + cli = require('./core/cli'), + BbPromise = require('bluebird'); class AzuriteQueue { constructor() { diff --git a/lib/actions/blob/GetContainerAcl.js b/lib/actions/blob/GetContainerAcl.js index 16a7259..82150b3 100644 --- a/lib/actions/blob/GetContainerAcl.js +++ b/lib/actions/blob/GetContainerAcl.js @@ -13,7 +13,8 @@ class GetContainerAcl { .then((response) => { if (response.proxy.original.access !== 'private') { response.addHttpProperty(N.BLOB_PUBLIC_ACCESS, response.proxy.original.access); - } + } + response.addHttpProperty(N.CONTENT_TYPE, 'application/xml'); res.set(response.httpProps); let xml = js2xmlparser.parse('SignedIdentifiers', response.proxy.original.signedIdentifiers || {}); xml = xml.replace(``, ``); diff --git a/lib/actions/queue/GetMessages.js b/lib/actions/queue/GetMessages.js index b0a2fb6..d5f1c40 100644 --- a/lib/actions/queue/GetMessages.js +++ b/lib/actions/queue/GetMessages.js @@ -3,7 +3,8 @@ const QueueManager = require('./../../core/queue/QueueManager'), QueueMessagesListXmlModel = require('./../../xml/queue/QueueMessageList').QueueMessageListXmlModel, QueueMessageXmlModel = require('./../../xml/queue/QueueMessageList').QueueMessageXmlModel, - AzuriteQueueResponse = require('./../../model/queue/AzuriteQueueResponse'); + AzuriteQueueResponse = require('./../../model/queue/AzuriteQueueResponse'), + N = require('./../../core/HttpHeaderNames'); class GetMessages { constructor() { @@ -26,6 +27,7 @@ class GetMessages { } const xmlBody = model.toXml(); const response = new AzuriteQueueResponse(); + response.addHttpProperty(N.CONTENT_TYPE, 'application/xml'); res.set(response.httpProps); res.status(200).send(xmlBody); } diff --git a/lib/actions/queue/GetQueueAcl.js b/lib/actions/queue/GetQueueAcl.js index ab3153a..966641c 100644 --- a/lib/actions/queue/GetQueueAcl.js +++ b/lib/actions/queue/GetQueueAcl.js @@ -2,7 +2,8 @@ const QueueManager = require('./../../core/queue/QueueManager'), js2xmlparser = require("js2xmlparser"), - AzuriteQueueResponse = require('./../../model/queue/AzuriteQueueResponse'); + AzuriteQueueResponse = require('./../../model/queue/AzuriteQueueResponse'), + N = require('./../../core/HttpHeaderNames'); class GetQueueAcl { constructor() { @@ -14,6 +15,7 @@ class GetQueueAcl { let xml = js2xmlparser.parse('SignedIdentifiers', signedIdentifiers || {}); xml = xml.replace(``, ``); const response = new AzuriteQueueResponse(); + response.addHttpProperty(N.CONTENT_TYPE, 'application/xml'); res.set(response.httpProps); res.status(200).send(xml); } diff --git a/lib/actions/queue/ListQueues.js b/lib/actions/queue/ListQueues.js index 50d7b4c..4a85f8d 100644 --- a/lib/actions/queue/ListQueues.js +++ b/lib/actions/queue/ListQueues.js @@ -3,7 +3,8 @@ const QueueManager = require('./../../core/queue/QueueManager'), QueueListXmlModel = require('./../../xml/queue/QueueList').QueueList, QueueXmlModel = require('./../../xml/queue/QueueList').Queue, - AzuriteQueueResponse = require('./../../model/queue/AzuriteQueueResponse'); + AzuriteQueueResponse = require('./../../model/queue/AzuriteQueueResponse'), + N = require('./../../core/HttpHeaderNames'); class ListQueues { constructor() { @@ -26,6 +27,7 @@ class ListQueues { } const xmlString = xmlModel.toXml(); const response = new AzuriteQueueResponse(); + response.addHttpProperty(N.CONTENT_TYPE, 'application/xml'); res.set(response.httpProps); res.status(200).send(xmlString); } diff --git a/lib/actions/queue/PeekMessages.js b/lib/actions/queue/PeekMessages.js index 857f594..e7dc81f 100644 --- a/lib/actions/queue/PeekMessages.js +++ b/lib/actions/queue/PeekMessages.js @@ -3,7 +3,8 @@ const QueueManager = require('./../../core/queue/QueueManager'), QueueMessagesListXmlModel = require('./../../xml/queue/QueueMessageList').QueueMessageListXmlModel, QueueMessageXmlModel = require('./../../xml/queue/QueueMessageList').QueueMessageXmlModel, - AzuriteQueueResponse = require('./../../model/queue/AzuriteQueueResponse'); + AzuriteQueueResponse = require('./../../model/queue/AzuriteQueueResponse'), + N = require('./../../core/HttpHeaderNames'); class PeekMessages { constructor() { @@ -24,6 +25,7 @@ class PeekMessages { } const xmlBody = model.toXml(); const response = new AzuriteQueueResponse(); + response.addHttpProperty(N.CONTENT_TYPE, 'application/xml'); res.set(response.httpProps); res.status(200).send(xmlBody); } diff --git a/lib/actions/queue/PutMessage.js b/lib/actions/queue/PutMessage.js index bc77dcc..2b78979 100644 --- a/lib/actions/queue/PutMessage.js +++ b/lib/actions/queue/PutMessage.js @@ -3,7 +3,8 @@ const QueueManager = require('./../../core/queue/QueueManager'), QueueMessagesListXmlModel = require('./../../xml/queue/QueueMessageList').QueueMessageListXmlModel, QueueMessageXmlModel = require('./../../xml/queue/QueueMessageList').QueueMessageXmlModel, - AzuriteQueueResponse = require('./../../model/queue/AzuriteQueueResponse'); + AzuriteQueueResponse = require('./../../model/queue/AzuriteQueueResponse'), + N = require('./../../core/HttpHeaderNames'); class PutMessage { constructor() { @@ -23,6 +24,7 @@ class PutMessage { })); const xmlBody = model.toXml(); const response = new AzuriteQueueResponse(); + response.addHttpProperty(N.CONTENT_TYPE, 'application/xml'); res.set(response.httpProps); res.status(201).send(xmlBody); }