Skip to content

Voting config exclusions APIs return \n response #57639

@russcam

Description

@russcam

Elasticsearch version (bin/elasticsearch --version): 7.8.0-SNAPSHOT

Plugins installed: []

JVM version (java -version): bundled JDK

OS version (uname -a if on a Unix-like system): Windows 10

Description of the problem including expected versus actual behavior:

The Voting Config Exclusions APIs (POST and DELETE) both return \n as the response with a content-type header of application/json and a content-length of 1. This response isn't valid JSON, and may require special handling in a language client, for example,

https://github.com/elastic/elasticsearch-net/pull/4738/files#diff-b2b266a90c4f392e9d643a396ef6a2d2R28-R38

Steps to reproduce:

  1. Make a POST to /_cluster/voting_config_exclusions?node_names=node1%2Cnode2 or a DELETE request to /_cluster/voting_config_exclusions?wait_for_removal=true
  2. Observe a response similar to
HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
content-length: 1



Possible solution(s)

  • Return no response body

or

  • Return an empty JSON object {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions