Comparing version 0.7.5 to 0.7.6
@@ -19,3 +19,3 @@ 'use strict'; | ||
.then((containers) => { | ||
res.set(new ResponseHeader({ 'Content-Type': 'application/xml' })); | ||
res.set(new ResponseHeader({'Content-Type': 'application/xml'})); | ||
let transformedModel = this._transformContainerList(containers, includeMetadata, prefix, maxresults, marker); | ||
@@ -26,3 +26,4 @@ let xmlDoc = js2xmlparser.parse('EnumerationResults', transformedModel); | ||
xmlDoc = xmlDoc.replace(/\>[\s]+\</g, '><'); | ||
res.status(200).send(xmlDoc); | ||
// Forcing Express.js to not touch the charset of the buffer in order to remove charset=utf-8 as part of the content-type | ||
res.status(200).send(new Buffer(xmlDoc)); | ||
}) | ||
@@ -29,0 +30,0 @@ .catch((e) => { |
@@ -42,4 +42,6 @@ 'use strict'; | ||
const model = new SignedIdentifiers(); | ||
for (const si of temp.SignedIdentifiers.SignedIdentifier) { | ||
model.addSignedIdentifier(si.Id[0], si.AccessPolicy[0].Start[0], si.AccessPolicy[0].Expiry[0], si.AccessPolicy[0].Permission[0]); | ||
if (temp.SignedIdentifiers !== "") { | ||
for (const si of temp.SignedIdentifiers.SignedIdentifier) { | ||
model.addSignedIdentifier(si.Id[0], si.AccessPolicy[0].Start[0], si.AccessPolicy[0].Expiry[0], si.AccessPolicy[0].Permission[0]); | ||
} | ||
} | ||
@@ -46,0 +48,0 @@ return model; |
@@ -28,3 +28,2 @@ 'use strict'; | ||
BlobNotFound: new ErrorCode('BlobNotFound', 404, 'The specified blob does not exist.'), | ||
RequestBodyTooLarge: new ErrorCode('RequestBodyTooLarge', 413, 'The size of the request body exceeds the maximum size permitted.'), | ||
BlobAlreadyExists: new ErrorCode('BlobAlreadyExists', 409, 'The specified blob already exists.'), | ||
@@ -31,0 +30,0 @@ UnsupportedHeader: new ErrorCode('UnsupportedHeader', 400, 'One of the headers specified in the request is not supported.'), |
@@ -21,2 +21,3 @@ 'use strict'; | ||
if (this.blobType === BlobTypes.PageBlob) { | ||
this.httpProps['x-ms-blob-content-length'] = httpHeader['x-ms-blob-content-length']; | ||
this.httpProps['x-ms-page-write'] = httpHeader['x-ms-page-write'] ? httpHeader['x-ms-page-write'].toUpperCase() : undefined; | ||
@@ -23,0 +24,0 @@ this.httpProps['x-ms-if-sequence-number-le'] = httpHeader['x-ms-if-sequence-number-le']; |
'use strict'; | ||
const uuidV1 = require('uuid/v1'); | ||
class ResponseHeader { | ||
@@ -8,2 +10,3 @@ constructor(systemProps, metaProps, optionalProps) { | ||
this['Content-Length'] = 0; | ||
this['x-ms-request-id'] = uuidV1(); | ||
systemProps = systemProps || {}; | ||
@@ -10,0 +13,0 @@ metaProps = metaProps || {}; |
@@ -28,2 +28,3 @@ 'use strict'; | ||
NumOfSignedIdentifiersVal = require('./validation/NumOfSignedIdentifiers'), | ||
PutBlobHeaderVal = require('./validation/PutBlobHeaders'), | ||
PageBlobHeaderSanityVal = require('./validation/PageBlobHeaderSanity'); | ||
@@ -136,2 +137,3 @@ | ||
.run(SupportedBlobTypeVal) | ||
.run(PutBlobHeaderVal) | ||
.run(BlobCreationSizeVal); | ||
@@ -145,3 +147,4 @@ | ||
blobType: blob.blobType, | ||
size: body.length | ||
// x-ms-blob-content-length is set only for page blobs | ||
size: blob.httpProps['x-ms-blob-content-length'] || body.length | ||
}); | ||
@@ -148,0 +151,0 @@ response.ETag = newBlob.meta.revision; |
{ | ||
"name": "azurite", | ||
"version": "0.7.5", | ||
"version": "0.7.6", | ||
"description": "A lightweight server clone of Azure Blob Storage that simulates most of the commands supported by it with minimal dependencies.", | ||
@@ -49,2 +49,3 @@ "scripts": { | ||
"request": "^2.79.0", | ||
"uuid": "^3.0.1", | ||
"xml2js": "^0.4.17" | ||
@@ -51,0 +52,0 @@ }, |
Sorry, the diff of this file is not supported yet
171840
69
3036
13
+ Addeduuid@^3.0.1