From a7313023f7d33df7cb64693f2a509678df38eec4 Mon Sep 17 00:00:00 2001 From: petromykhailysyn Date: Tue, 26 Jan 2016 17:02:24 +0200 Subject: [PATCH] Revert "If servletContextPath is not root (application is deployed not to the root) we should take it into consideration while determinating server base." This reverts commit 0e3bb5a7977b4d756125279ab8aa74720acda302. --- .../uhn/fhir/rest/server/IncomingRequestAddressStrategy.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/IncomingRequestAddressStrategy.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/IncomingRequestAddressStrategy.java index f65f009019d..c018a2e29bb 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/IncomingRequestAddressStrategy.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/IncomingRequestAddressStrategy.java @@ -71,6 +71,9 @@ public class IncomingRequestAddressStrategy implements IServerAddressStrategy { } else { //servletContextPath can start with servletPath contextIndex = requestUrl.indexOf(servletPath + "/", startOfPath); + if (contextIndex == -1) { + contextIndex = requestUrl.indexOf(servletPath, startOfPath); + } } String fhirServerBase;