Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty HTTP body returned from _recovery API on empty cluster #5743

Closed
karmi opened this issue Apr 9, 2014 · 0 comments · Fixed by #5756
Closed

Empty HTTP body returned from _recovery API on empty cluster #5743

karmi opened this issue Apr 9, 2014 · 0 comments · Fixed by #5756
Assignees
Labels

Comments

@karmi
Copy link
Contributor

karmi commented Apr 9, 2014

When the _recovery API is executed against a cluster with no indices, an empty HTTP body is returned, causing errors in clients expecting a valid JSON response:

$ elasticsearch --cluster.name=recovery_response_error --http.port=9280
# ...
$ curl -i localhost:9280/_recovery
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 0

An empty JSON object ({}) is expected here.

@aleph-zero aleph-zero self-assigned this Apr 9, 2014
aleph-zero pushed a commit that referenced this issue Apr 21, 2014
This is a fix to send back to the client a valid empty JSON response in
the case when we have no recovery information.

Closes #5743
mikemccand pushed a commit to mikemccand/elasticsearch that referenced this issue Apr 24, 2014
This is a fix to send back to the client a valid empty JSON response in
the case when we have no recovery information.

Closes elastic#5743
@clintongormley clintongormley added the :Core/Infra/REST API REST infrastructure and utilities label Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants