Skip to content

Commit

Permalink
Always send Content-Length header. Fixes compatibility issues with el…
Browse files Browse the repository at this point in the history
  • Loading branch information
saschagoebel committed Nov 6, 2015
1 parent 4b7cd3d commit 6f7e165
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/connectors/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,11 @@ HttpConnector.prototype.request = function (params, cb) {
request.setHeader('Content-Length', Buffer.byteLength(params.body, 'utf8'));
request.end(params.body);
} else {
request.setHeader('Content-Length', 0);
request.end();
}

return function () {
request.abort();
};
};
};

0 comments on commit 6f7e165

Please sign in to comment.