Closed pulkitsinghal closed 11 years ago
Found a clue so wanted to share: 1) https://github.com/elasticsearch/cookbook-elasticsearch/issues/38 2) And another client with a similar problem: https://github.com/phillro/node-elasticsearch-client/issues/64 ... attempts (but fails I think) to solve the issue by explicitly making sure to set the content-length: https://github.com/phillro/node-elasticsearch-client/blob/master/lib/elasticsearchclient/calls/elasticSearchCall.js#L86 3) How could this be handled in elastic.js?
FYI: I was able to ask my team to push configuration changes to the nginx-servers which include support for chunked transfer-encoding ... so I'm no longer running into this problem when using the elasticjs client.
¿Shouldn't elastic-node-client add the ''Content-Length' header in the post and put functions to make it compatible with servers that don't support chunking? (like older nginx versions)
Have the authors of elastic.js ever run into the scenario where a 411 status code is returned while posting data with this client?
Its understandable that the client isn't ready for this and the
JSON.parse()
method inelastic-node-client.js:208:25
gets confused and the system throws a SyntaxError:But I'm more curious as to why the client might run into such a situation in the 1st place.