You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NEST do a POST request for Refresh method and does not set Content-Length header.
In common case NEST should set it, because POST request implies that you have message body, so you always should set Content-Length for POST requests (if no body provided then you should set zero)
NEST do a POST request for Refresh method and does not set Content-Length header.
In common case NEST should set it, because POST request implies that you have message body, so you always should set Content-Length for POST requests (if no body provided then you should set zero)
http://www.w3.org/Protocols/rfc2616/rfc2616.txt
Elasticsearch is using Netty web server, that is tolerant and allows POST requests without Content-Length provided.
BUT if I use IIS reverse proxy behind of elasticsearch, then IIS not allowing such requests
If I use elasticsearch-head, then all is OK, elasticsearch-head is setting Content-Length:0 for Refresh method
I am not familiar with code, but I think changes required in file HttpConnection.cs
https://github.com/elasticsearch/elasticsearch-net/blob/f85ce38eca2d1ed13f4f5a094c13d9ec1da77b0a/src/Elasticsearch.Net/Connection/HttpConnection.cs
in method CreateWebRequest add something like
if (method == "Post"){
myReq.ContentLength = 0;
}
oк using IRequestConnectionConfiguration interface
The text was updated successfully, but these errors were encountered: