Merge pull request #289 from petromykhailysyn/master

ServletContextPath can start with servletPath, it should be taken into consideration
This commit is contained in:
James Agnew 2016-02-03 14:06:18 -05:00
commit def7fc93e0
1 changed files with 5 additions and 1 deletions

View File

@ -69,7 +69,11 @@ public class IncomingRequestAddressStrategy implements IServerAddressStrategy {
contextIndex = requestUrl.indexOf(requestPath, startOfPath); contextIndex = requestUrl.indexOf(requestPath, startOfPath);
} }
} else { } else {
contextIndex = requestUrl.indexOf(servletPath, startOfPath); //servletContextPath can start with servletPath
contextIndex = requestUrl.indexOf(servletPath + "/", startOfPath);
if (contextIndex == -1) {
contextIndex = requestUrl.indexOf(servletPath, startOfPath);
}
} }
String fhirServerBase; String fhirServerBase;