-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Closed
Labels
:Distributed Coordination/NetworkHttp and internode communication implementationsHttp and internode communication implementations>bugv6.4.0v7.0.0-beta1
Description
Currently when we convert a low-level netty http method to an elasticsearch http method we consider an unknown request type to be a GET
request.
public Method method() {
HttpMethod httpMethod = request.method();
if (httpMethod == HttpMethod.GET)
return Method.GET;
if (httpMethod == HttpMethod.POST)
return Method.POST;
if (httpMethod == HttpMethod.PUT)
return Method.PUT;
if (httpMethod == HttpMethod.DELETE)
return Method.DELETE;
if (httpMethod == HttpMethod.HEAD) {
return Method.HEAD;
}
if (httpMethod == HttpMethod.OPTIONS) {
return Method.OPTIONS;
}
return Method.GET;
}
Currently that means that PATCH
, TRACE
, and CONNECT
methods are treated as GET
methods by elasticsearch. If we do not plan on supporting these methods, we should just return a 405 instead of silently pretending that these are GET
requests.
nik9000, jasontedor, dakrone, Citizen01 and damienalexandre
Metadata
Metadata
Assignees
Labels
:Distributed Coordination/NetworkHttp and internode communication implementationsHttp and internode communication implementations>bugv6.4.0v7.0.0-beta1