If servletContextPath is not root (application is deployed not to the root) we should take it into consideration while determinating server base.
This commit is contained in:
parent
e73f409800
commit
0e3bb5a797
|
@ -73,7 +73,12 @@ public class IncomingRequestAddressStrategy implements IServerAddressStrategy {
|
|||
}
|
||||
|
||||
String fhirServerBase;
|
||||
int length = contextIndex + servletPath.length();
|
||||
int length;
|
||||
if (servletContextPath.length() == 0 || servletContextPath.equals("/")) {
|
||||
length = contextIndex + servletPath.length();
|
||||
} else {
|
||||
length = contextIndex + servletPath.length() + servletContextPath.length();
|
||||
}
|
||||
if (length > requestUrlLength) {
|
||||
length = requestUrlLength;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue