diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_3_0/2372-throw-error-on-protocol-aware-url.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_3_0/2372-throw-error-on-protocol-aware-url.yaml new file mode 100644 index 00000000000..25cadc11dce --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_3_0/2372-throw-error-on-protocol-aware-url.yaml @@ -0,0 +1,5 @@ +--- +type: change +issue: 2372 +title: "ElasticsearchHibernatePropertiesBuilder will now reject any REST url which is protocol-aware. Protocol information should be set in the protocol field of the builder." + diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java index e99b73d632a..acca2706551 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/search/elastic/ElasticsearchHibernatePropertiesBuilderTest.java @@ -32,11 +32,11 @@ class ElasticsearchHibernatePropertiesBuilderTest { @Test public void testRestUrlCannotContainProtocol() { String host = "localhost:9200"; - String protocolHost = "http://" + host; + String protocolHost = "https://" + host; String failureMessage = "Elasticsearch URL cannot include a protocol, that is a separate property. Remove http:// or https:// from this URL."; myPropertiesBuilder - .setProtocol("http") + .setProtocol("https") .setUsername("whatever") .setPassword("whatever");