[BUG] fix MainResponse to spoof version number for legacy clients (#708)
This commit changes MainResponse to spoof OpenSearch 1.x version numbers as Legacy version number 7.10.2 for legacy clients. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This commit is contained in:
parent
053ed7b66d
commit
403c511c17
|
@ -102,7 +102,11 @@ public class MainResponse extends ActionResponse implements ToXContentObject {
|
|||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
out.writeString(nodeName);
|
||||
if (out.getVersion().before(Version.V_1_0_0)) {
|
||||
Version.writeVersion(LegacyESVersion.V_7_10_2, out);
|
||||
} else {
|
||||
Version.writeVersion(version, out);
|
||||
}
|
||||
clusterName.writeTo(out);
|
||||
out.writeString(clusterUuid);
|
||||
Build.writeBuild(build, out);
|
||||
|
|
Loading…
Reference in New Issue