node-elasticsearch-client
node-elasticsearch-client copied to clipboard
Content-Length header is absent
Module sends invalid request wich make it unusable if we place elastic behind ngnx.
As we run:
elasticSearchClient.createIndex("test_index")
.on('data', function(data) {
console.log("results -->");
console.log(data);
}).exec();
We get:
<html>
<head><title>411 Length Required</title></head>
<body bgcolor="white">
<center><h1>411 Length Required</h1></center>
<hr><center>nginx</center>
</body>
</html>
Hrm, we use it behind nginx in prod. Also Line 86: https://github.com/phillro/node-elasticsearch-client/blob/master/lib/elasticsearchclient/calls/elasticSearchCall.js
However I try to reproduce.
On Tue, Mar 19, 2013 at 7:37 AM, droganov [email protected] wrote:
Module sends invalid request wich make it unusable if we place elastic behind ngnx.
As we run:
elasticSearchClient.createIndex("test_index") .on('data', function(data) { console.log("results -->"); console.log(data); }).exec();
We get:
411 Length Required 411 Length Required
nginx — Reply to this email directly or view it on GitHubhttps://github.com/phillro/node-elasticsearch-client/issues/64 .
in line 81: if this.params.data is null (default settings for index) --> no header Content-Length.