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);
|
contextIndex = requestUrl.indexOf(requestPath, startOfPath);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
contextIndex = requestUrl.indexOf(servletPath, startOfPath);
|
//servletContextPath can start with servletPath
|
||||||
|
contextIndex = requestUrl.indexOf(servletPath + "/", startOfPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
String fhirServerBase;
|
String fhirServerBase;
|
||||||
int length;
|
int length = contextIndex + servletPath.length();
|
||||||
if (servletContextPath.length() == 0 || servletContextPath.equals("/")) {
|
|
||||||
length = contextIndex + servletPath.length();
|
|
||||||
} else {
|
|
||||||
length = contextIndex + servletPath.length() + servletContextPath.length();
|
|
||||||
}
|
|
||||||
if (length > requestUrlLength) {
|
if (length > requestUrlLength) {
|
||||||
length = requestUrlLength;
|
length = requestUrlLength;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue