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… (
opensearch-project#8084) * Added server distribution and version into response header Signed-off-by: Sam Hobbs <[email protected]> * Removed extra lines Signed-off-by: Sam Hobbs <[email protected]> * Update server/src/main/java/org/opensearch/http/DefaultRestChannel.java Co-authored-by: Owais Kazi <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> * Moved defining of server header string Signed-off-by: Sam Hobbs <[email protected]> * Removed wildcard import Signed-off-by: Sam Hobbs <[email protected]> * Applied spotless to files Signed-off-by: Sam Hobbs <[email protected]> * Added to testHeadersSet test within the default rest channel test file to test that server version is returned Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Added comment Signed-off-by: Sam Hobbs <[email protected]> * 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 <[email protected]> * Refactored hash map from server header to server version and updated test Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Moved server version field from global variable to local, defined sever string as static value Signed-off-by: Sam Hobbs <[email protected]> * Added prefix to header title Signed-off-by: Sam Hobbs <[email protected]> * Removed redundant serverVersion field and instead inlined creation of map passed into addCustomHeader method Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Removed redundant OPEN_SEARCH_NAME_VALUE Signed-off-by: Sam Hobbs <[email protected]> * Update server/src/test/java/org/opensearch/http/DefaultRestChannelTests.java Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> * Moved change log addition to 2.x unreleased and wrote message in imperative Signed-off-by: Sam Hobbs <[email protected]> * Corrected name of fetched header in header test Signed-off-by: Sam Hobbs <[email protected]> * Added server version header value as constant Signed-off-by: Sam Hobbs <[email protected]> --------- Signed-off-by: Sam Hobbs <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> Co-authored-by: Owais Kazi <[email protected]> Co-authored-by: Andriy Redko <[email protected]>
- Loading branch information