mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-18 10:55:22 +00:00
ServletContextPath can start with servletPath, now it's taking into consideration while determinate contextIndex.
This commit is contained in:
parent
c855fc5365
commit
83823aad35
@ -69,16 +69,12 @@ public class IncomingRequestAddressStrategy implements IServerAddressStrategy {
|
||||
contextIndex = requestUrl.indexOf(requestPath, startOfPath);
|
||||
}
|
||||
} else {
|
||||
contextIndex = requestUrl.indexOf(servletPath, startOfPath);
|
||||
//servletContextPath can start with servletPath
|
||||
contextIndex = requestUrl.indexOf(servletPath + "/", startOfPath);
|
||||
}
|
||||
|
||||
String fhirServerBase;
|
||||
int length;
|
||||
if (servletContextPath.length() == 0 || servletContextPath.equals("/")) {
|
||||
length = contextIndex + servletPath.length();
|
||||
} else {
|
||||
length = contextIndex + servletPath.length() + servletContextPath.length();
|
||||
}
|
||||
int length = contextIndex + servletPath.length();
|
||||
if (length > requestUrlLength) {
|
||||
length = requestUrlLength;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user