Reveal Content-Length on x-pack info HEAD requests

This commit permits x-pack info HEAD requests to reveal the
Content-Length of the response.

Relates elastic/elasticsearch#3887

Original commit: elastic/x-pack-elasticsearch@8696caa1f6
This commit is contained in:
Jason Tedor 2016-10-25 23:12:54 -04:00 committed by GitHub
parent 0b24f022f7
commit 007e49c5d9
1 changed files with 0 additions and 6 deletions

View File

@ -50,12 +50,6 @@ public class RestXPackInfoAction extends XPackRestHandler {
@Override
public RestResponse buildResponse(XPackInfoResponse infoResponse, XContentBuilder builder) throws Exception {
// we treat HEAD requests as simple pings to ensure that X-Pack is installed
// we still execute the action as we want this request to be authorized
if (request.method() == RestRequest.Method.HEAD) {
return new BytesRestResponse(OK, builder);
}
builder.startObject();
if (infoResponse.getBuildInfo() != null) {