Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the addition of the server version and distribution as a respon… (
#8084) * Added server distribution and version into response header Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Removed extra lines Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Update server/src/main/java/org/opensearch/http/DefaultRestChannel.java Co-authored-by: Owais Kazi <owaiskazi19@gmail.com> Signed-off-by: Sam Hobbs <118170270+Sam-ScottLogic@users.noreply.github.com> * Moved defining of server header string Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Removed wildcard import Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Applied spotless to files Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Added to testHeadersSet test within the default rest channel test file to test that server version is returned Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Ran spotless Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Added comment Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Created static string for reused server header title and name of application strings, also refactored server header to server version Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Refactored hash map from server header to server version and updated test Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Ran spotless Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Moved server version field from global variable to local, defined sever string as static value Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Added prefix to header title Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Removed redundant serverVersion field and instead inlined creation of map passed into addCustomHeader method Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Ran spotless Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Removed redundant OPEN_SEARCH_NAME_VALUE Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Update server/src/test/java/org/opensearch/http/DefaultRestChannelTests.java Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: Sam Hobbs <118170270+Sam-ScottLogic@users.noreply.github.com> * Moved change log addition to 2.x unreleased and wrote message in imperative Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Corrected name of fetched header in header test Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> * Added server version header value as constant Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> --------- Signed-off-by: Sam Hobbs <shobbs@scottlogic.com> Signed-off-by: Sam Hobbs <118170270+Sam-ScottLogic@users.noreply.github.com> Co-authored-by: Owais Kazi <owaiskazi19@gmail.com> Co-authored-by: Andriy Redko <drreta@gmail.com>
- Loading branch information