Skip to content

Commit

Permalink
Fix content type concatenating in table service.
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacfan committed Aug 2, 2018
1 parent 5ab6c75 commit 48cb6ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/services/table/models/batchresult.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

// Module dependencies.
var azureCommon = require('./../../../common/common.core');
var azureutil = azureCommon.util;
var Md5Wrapper = require('./../../../common/md5-wrapper');
var StorageServiceClient = azureCommon.StorageServiceClient;
var WebResource = azureCommon.WebResource;
Expand Down Expand Up @@ -115,7 +116,11 @@ BatchResult.prototype._serializeOperation = function (operation, count) {
webResource.headers[HeaderConstants.CONTENT_ID] = count;
}

if (webResource.headers[HeaderConstants.CONTENT_TYPE]) {
var contentType = webResource.headers[HeaderConstants.CONTENT_TYPE];
if (contentType) {
if (!azureutil.stringEndsWith(contentType, ';')) {
webResource.headers[HeaderConstants.CONTENT_TYPE] += ';';
}
webResource.headers[HeaderConstants.CONTENT_TYPE] += 'type=entry';
}

Expand Down

0 comments on commit 48cb6ac

Please sign in to comment.