Skip to content

Commit 4d5a821

Browse files
committed
do not assume empty response for null length #163
1 parent 88e5056 commit 4d5a821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mlrest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ function responseDispatcher(response) {
493493
var inputHeader = isMultipart ? responseBoundary : responseType;
494494

495495
var responseLength = response.headers['content-length'];
496-
var isEmpty = (valcheck.isNullOrUndefined(responseLength)|| responseLength === '0');
496+
var isEmpty = (!valcheck.isNullOrUndefined(responseLength) && responseLength === '0');
497497

498498
var expectedType = operation.responseType;
499499

0 commit comments

Comments
 (0)