Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
merges bugfixes from #163
Browse files Browse the repository at this point in the history
  • Loading branch information
arafato committed Mar 13, 2018
1 parent 2141899 commit 8d7d6d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/model/table/AzuriteTableRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AzuriteTableRequest {
}

_initHttpProps(httpHeaders) {
this.httpProps[N.CONTENT_TYPE] = httpHeaders[N.CONTENT_TYPE] || `application/json;`;
this.httpProps[N.CONTENT_TYPE] = httpHeaders[N.CONTENT_TYPE] || `application/json`;
this.httpProps[N.ACCEPT] = httpHeaders[N.ACCEPT] || `application/json;odata=nometadata`;
this.httpProps[N.PREFER] = httpHeaders[N.PREFER] || `return-content`;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/model/table/RequestPayloadParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ class RequestPayLoadParser {
}

parse(contentType, body) {
if (body.length === 0) {
if (!body.length || body.length === 0) {
return {};
}
switch (contentType) {
case 'application/atom+xml;':
case 'application/atom+xml':
throw new IAError(`accept value of 'atom+xml' is currently not supported by Azurite`);
break;
case 'application/json;':
case 'application/json':
const txt = body.toString('utf8');
return JSON.parse(txt);
break;
Expand Down

0 comments on commit 8d7d6d4

Please sign in to comment.